Can you get into trouble for not answering questions when talking to the police?
england-and-wales
NO, Maybe, Yes
It depends on what, if any, legislation causes the questions to be asked whether failure to answer can get someone in to trouble.
Apart from general day-to-day conversations, there are three instances when an officer may ask someone questions:
Stop and Account. This interaction is totally voluntary and failure to answer is not, in itself, cause for reasonable suspicion of any offence, so one cannot "get in to trouble" by staying silent.
The terminology varies from Force to Force, but can be summarised as:
What are you doing?
Why are you in the area?
Where are you going?
What are you carrying?
There is no legal requirement or obligation to answer any of these questions, and the police cannot lawfully detain anyone to ask them.
Under Caution. To add to the answer given by user28517 (a deleted account, formerly @moo), above, the caution is given before questioning a person concerning their suspected involvement in a suspected offence. They do not have to be under arrest as England and Wales allows for voluntarily attended interviews under caution. One may "get in to trouble" by not answering if the trial judge directs the jury to consider the Adverse Inferences which, to use moo's words, means "not mentioning something might harm your position".
Compulsion. There are a few occasions when a person may "get in to trouble" and commit an offence by not answering a question. For example, a Disclosure Notice under s.62(3) of the Serious Organised Crime Act 2005 may require (ie compel) someone to given an answer - the offence of not doing so is at s.67. As this piece of legislation is designed, in part, to elicit information from a bit-player on the fringes of criminality in order to build a case against a "bigger fish", s.65(1) provides a statutory immunity from self-incrimination relating to the answer unless they have lied or failed to properly answer.