What it means
To put your foot in it means blurting out exactly the wrong thing and realising a split second too late that you've just made the whole room wince. It's used for those awkward social moments when you accidentally poke the sore bit and now everyone's staring into their drink.
Usage examples
"I really put my foot in it when I asked about his job, turns out he was made redundant last week."
"I really put my foot in it asking about her ex, I had no idea they'd split up."
"I put my foot in it at dinner and asked when they're having kids, then found out they'd been trying for years."
"He proper put his foot in it, congratulating her on the promotion she'd literally just been turned down for."
"I put my foot in it big time and asked if her mum was coming, then remembered they'd stopped speaking."
Where it comes from
This is a British idiom. It grows out of the older idea of stepping in something nasty, as in stepping in muck and ending up in a mess. By the late 19th century, put your foot in it was being used for saying the wrong thing, keeping that same image of clumsy, avoidable trouble.