In the French language, when I meet someone, I decide whether I am going to use the polite form or familiar form. I usually stick to one. I don't go switching back and forth between them.
In Japanese, people often switch back and forth all the time. This is very tough to learn, but there is no logical way to really learn it other than just to get a lot of experience with the language. It's not just a simple matter of polite or familiar forms. I would say that each way of using polite or informal speech has it's own feeling of a level of politeness or familiarity.