Disclaimer: I am not a lawyer so please do your own research on local rules and laws for your location. Please do not consider this as legal advice; it may be wrong. Consult an attorney or a professional if you have questions.
Imagine yourself walking in a downtown area doing street photography and chasing candid moments. You just love to hear the music of the city bustling and you can see wonderful moments happen right before your eyes. You walk, take a picture and move on. There is just something special about the city that you would like to capture candidly. A couple hugging each other before a train leaves, a boy who chases some pigeons as they fly away, a mud puddle with a reflection of people passing by...and then somebody taps you on your shoulder...you turn around and see police officers asking you questions about what you are doing. What do you do? What if you get harassed, told to stop taking pictures or in the worst case get you camera confiscated and you arrested.
It might be scary for people to get confronted by police officers but as a citizen you have to exercise your rights as a photographer. I compiled a list of articles and helpful links that informs you your rights as a photographer. Again, I am not a lawyer so please do your own research on local rules and laws for your location. Please don't not consider this as legal advice; it may be wrong. Consult an attorney or a professional if you have questions.
-All people should be taught what their rights are before they encounter a police officer.
-Remain calm, remain respectful and assert your rights because you do have those rights.
Here is a follow up lecture by B&H