That's a difficult question !
In France, you can shake hands or "faire la bise".
Do not hug people execpt if it's a very, very good friend you haven't seem for ages.
Shake hands (serrer la main) is more formal, but it's also more polite. You take no risk and it's better.
The best advice I can give is : don't take the initiative yourself, just follow what people do.
Always be ready to shake hands, and you will see.
Faire la bise depends on many different rules, on the social context, how old is the person in front of you, how many times you've seen him/her before.
So you can never know when it's the right time to switch from “serrer la main” to “faire la bise”.
Even French people get confused !
So, as a foreigner, just use the most polite way, shake hands. And you will see. If someone decides it's time to “faire la bise”, he/she will shake your hand, keep it in his/her hand and lean toward you to “faire la bise” at the same time !
That's the signal ! Now you know, with this person, next time you can directly “faire la bise”.