I'm back from the weekend! After doing idioms for a week, I decided that 5 days a week would be good. After all, I wouldn't want to run out! :)
It is something that happens when one says something that is hurtful to someone else present. The speaker did not intend to hurt the other person's feelings, and therefore is embarrassed when they realize it. (As one would be embarrassed to get caught with their foot in their mouth.)
It can happen under two different circumstances. 1) The speaker didn't realize that they would hurt the others' feelings. 2) The speaker didn't realize that the person could hear them (like when gossiping).
Tom: George your niece is lovely.
George: That's not my niece, she's my wife!
Tom: I really put my foot in my mouth with that one. I'm sorry.
Lucy: Did you see Greg? He's looking so old? And what is he wearing?
Ann: You do realize that Greg is standing right behind you? You put your foot in your mouth again! Will you ever learn?
A variation of this is: Open mouth; insert foot.