I want to clarify the scope of this advice. If I've actually committed a crime and a cop is interrogating me about it, I should shut up and talk to my lawyer. (e.g. I robbed someone's house) In the other extreme, if someone's committed a crime against me, I should actively call the police to talk to them (e.g. someone robbed my house).
The majority of interactions with police fall somewhere between these two examples in terms of susceptibility. What determines when I should be talking to the cops and when I shouldn't?