Barty Crouch Jr. is the son of Barty Crouch Sr., a high-ranking Ministry of Magic official. He was imprisoned for torturing and killing a Death Eater. Crouch Jr. escaped Azkaban and used Polyjuice Potion to impersonate Alastor Moody, the real Defence Against the Dark Arts teacher.
Crouch Jr. was acting under Voldemort's orders to ensure Harry's participation in the Triwizard Tournament and to get Harry to the graveyard to be killed by Voldemort.