Stay calm. Don't run. Don't argue, resist or obstruct the police, even if you are innocent or police are violating your rights. Keep your hands where police can see them. You do not have to answer any questions. You can say, “I do not want to talk to you” and walk away calmly. Or, if you do not feel comfortable doing that, you can ask if you are free to go. If the answer is yes, you can consider just calmly and silently walking away. Do not run from the officer.
If the officer says you are not under arrest, but you are not free to go, then you are being detained. Being detained is not the same as being arrested, though an arrest could follow.
The police can "pat down" the outside of your clothing only if they have “reasonable suspicion” (i.e., an objective reason to suspect) that you might be armed and dangerous (carrying a weapon). If they search any more than this, say clearly, “I do not consent to a search.” If they keep searching anyway, do not physically resist them. You should not physically resist, but you have the right to refuse consent for any further search. If you do consent, it can affect you later in court.
You do not need to answer any questions if you are detained or arrested, except that the police may ask for your name once you have been detained, and you can be arrested in some states for refusing to provide it. If you are under arrest, you have a right to know why. You have the right to remain silent and cannot be punished for refusing to answer questions. If you wish to remain silent, tell the officer out loud. (Non-citizens should see
ALCU website for more information on this topic.)