Know your surroundings: How to stay safe while protesting

So if you plan to join a protest, how can you keep yourself safe?