When you come in contact with the police, do you feel confident that you know how to handle yourself? Whether it’s a traffic stop or an officer at the door, you want to know how to talk to them.

First and foremost, remember that you often have a right to remain silent. Even if they’re arresting you, you do not have to answer questions. You don’t have to say anything that may incriminate yourself.

On top of that, even if you do say something, it may not stand if the police broke procedures. Maybe you confessed, but only because they violated your rights. Even a direct confession — true or otherwise — may not stand and may not get used as evidence.

The best thing you can do is to keep your cool. Do not antagonize the police. Don’t insult them. Don’t swear at them. While swearing itself isn’t illegal, it just escalates the situation. When things go too far, they may arrest you for things like obstructing justice, resisting the authorities or threatening the officers. Just stay in control.

One way to help you stay cool and collected is just to remember that you have legal rights. Maybe you don’t think the police have a reason to arrest you. Don’t resist arrest and make things worse. Just stay calm and remember that you can fight an illegal arrest in court.

Talking to the police can be disconcerting and stressful. Be sure you know what to say, what not to say, and what legal rights you have if you do get arrested.