How can I find the « police » or « gendarmerie »
First, you must know that in France, there is « police » and « gerndarmerie ». They do nearly the same things and you can contact both. The difference is that « gendarmerie » belongs to the army.
As they have (nearly) the same mission, you don't need to choose between « police » and « gendarmerie ». Most of the time the choice will be easily done : close to your home there's a « gendarmerie » OR a « commissariat de police » but not both. So, if you have to, go to the closest.
How can I find it ?
If you search on the web, the best is to go on a site like : « pages jaunes » and type « commissariat de police » or « gendarmerie ». Specify the town name and you will get the address.
If you have more time, just visit your town or area and you will find where it is.
You can also go to the town hall « mairie » and ask them.
If you're really in trouble, dial « 17 » (dial : 112 if you call from a mobile phone).
When do I have to go to the police or gendarmerie ?
Gendarmerie and police are useful when you get into trouble, if you have a car accident and the other person doesn't want to give you his/her name an address (for your insurance) and also if you lose your driving licence or your « titre de séjour » (or if they're stolen). You also need to go to the police or gendarmerie if you're "carte grise" is stolen (only if this specific document is stolen and not lost, if it's lost, see this article for more details).
In these cases, you'll have to go to the police or gendarmerie for a « déclaration de perte » or « déclaration de vol », it's just a document specifying where and when you lost these documents but it's compulsory.