Gamers joke around the table but they do take their tonal cues from the GM. If I'm running a "serious" (whatever that means) scene and the player makes a joke, I let him make his joke, but I also pause the scene. I don't say or do anything until the player says or does anything that I as a GM would be considered "in character."
Does it break the flow of the game? Yes. Is it inevitable? Yes. Is it worth getting upset about? No.
You can get a lot of mileage of out not condoning irritating behaviors or even reacting to them.
I would also say that an ounce of prevention is worth a pound of cure. If you have players you know won't fit your game style, don't play this game with them but invite them to play something else down the road.