"Put one's foot in it" means to say something wrong or unsuitable, usually as a result of thoughtfulness (does it ring a bell??), and so cause an awkward or unpleasant situation. The expression is British, I think. Americans say "put one's foot in one's mouth".
"I really put my foot in it when I asked him how his wife was; she's left him for another man."