to mess things up, to put one's foot in it
Ele meteu os pés pelas mãos quando tentou consertar o computador sozinho.
He messed things up when he tried to fix the computer by himself.
The phrase paints a deliberately absurd picture: someone so flustered they put their feet where their hands should go — meter os pés pelas mãos, literally "to put the feet through the hands.
Falando's Idiom Trainer teaches you to recognize idiom meanings and create sentences using them, so you can speak like a Brazilian.