Once, the phrase "to stick one's foot in one's mouth" was common. It meant that someone had said something that was inappropriate and, probably, embarrassing. For example, if you were at an important dinner with a Microsoft executive and, in the course of telling a story, you accidentally mentioned that you wished a couple of big companies were unfairly limiting competition, you would have just "stuck your foot in your mouth."
Currently, a more original version of that saying has come into usage. It is "Open Mouth, Insert Foot." Obviously, this alludes to the step-by-step how-to guides that exist for just about everything (from using a computer to having sex). In addition, it can be said in a quicker and, perhaps, more witty fashion. (Of course, as with all witty variations, it will shortly become passe-so watch out!)
The most important thing to remember is to never be on the receiving edge of the "Open Mouth, Insert Foot" reference. Polite company will try to get you out of your uncomfortable situation. However, as polite company has become more and more limited to the Vatican alone, you are likely to be made to feel even more uncomfortable as those around you play up your foolishness! Even if they do not, you are not likely to forget the uncomfortable feeling very quickly.