Tens of thousands of Americans took to the streets this week to protest a Missouri grand jury's decision not to indict Ferguson police Officer Darren Wilson for fatally shooting 18-year-old Michael Brown during an apparent altercation in August. Some protests have devolved into violence and ended with arrests, but there are a few things you should keep in mind if you want to stay out of handcuffs.

“People need to use their judgment and recognize the actions of a group may not be the actions you want to undertake,” said Hillary Davis, a policy associate at the Rhode Island affiliate of the ACLU. “It is very easy to get caught up with things you didn’t intend to be a party of, and that’s why we say use your personal judgment. It’s ultimately up to the individual’s comfort level.”

Knowing where police have the right to remove you, as in some government buildings or on private property, can help protect you from being arrested or hurt, Davis said. Protesters don’t need permits to march on a sidewalk or otherwise demonstrate in a manner that doesn’t block traffic, which is protected under the First Amendment, but there are certain restrictions on public parks or areas that are up to the individual municipality where you might protest.

If possible, make sure that whatever group is organizing the protest has the proper permits for loudspeakers, and find out exactly where and when the protest will be held. The ACLU called this the right of authorities to set restrictions on the “time, place and manner” in which a protest happens. Altercations can arise from disagreements over what powers the police have to enforce these restrictions, which “may violate the First Amendment if they are unnecessary for traffic control or public safety,” the ACLU says in its national guidelines.

With emotions running high, protests in Ferguson and Seattle have led to violence, vandalism and looting. Protesters are upset with what many call a lack of respect for the lives of black Americans, particularly in segregated neighborhoods that tend to breed tension between police and residents. Many felt that Wilson, a white man, should have been indicted on murder charges for shooting Brown, who was black.

If you are stopped or arrested by police, the ACLU recommends not resisting. Keep your hands where police can see them and explain that you are not “disrupting anyone else's activity,” then ask to leave and if they say yes, do so calmly and silently. Read the ACLU’s national “know your rights” guide here, but keep in mind that the laws may differ in each state. To see an example, here are New York’s protest laws, via Occupy Wall Street and the New York Civil Liberities Union.

In a potentially dangerous situation, police are looking for “problem” individuals who may betray the peaceful nature of a protest and become violent, said Ralph Purdy, president of the New York State Federation of Police. It is key for police to arrest or otherwise handle these individuals before they influence the larger group of protesters. Usually a crowd will return to order if these people are removed. Purdy said this technique was key to responding to civil rights protests when he was an officer in Greenburgh, New York, during the 1960s. If you shout insults at people, antagonize, vandalize property or advocate for violence in any way, you’ll probably get singled out.

“Nobody has a right to break windows and destroy property,” Purdy said. “Often that's the work of outside individuals that aren't as invested in the movement as the local population. Once that starts happening we don't have any other choice but to break up the crowd and protect innocent people and property.”

If a protest starts to turn violent, its best “to get the heck out and as far away as possible,” he said.