Gilderoy Lockhart became Professor Gilderoy Lockhart, when in the school year of 1992-1993, he was appointed to the post of Defence Against the Dark Arts Teacher at Hogwarts School of Witchcraft and Wizardry. He made an instant impact there by, in his first lesson, giving his second year class a test which had nothing to do with the subject at hand, but revolved somewhat more around his biography. He was not popular amongst his fellow staff members and was particularly disliked by Professor Severus Snape, who was after the position Gilderoy held. However, teachers and students alike eventually grew to tolerate him.
Kenneth Branagh played him onscreen.
Gilderoy Lockhart was exposed as a fraud, when, trying to avoid travelling into the Chamber of Secrets, he let slip the fact that he had not in fact performed all the amazing feats described in his books, but merely travelled the globe, stealing other people's stories, placing memory charms on those people so they would never find out he had stolen their tales, and passing them off as his own. When he tried to obliviate Harry Potter and Ronald Weasley's memory of this fraud, the spell backfired on him due to a broken wand. Consequently, Gilderoy lost his memory, and was sent to St Mungo's Hospital for Magical Maladies and Injuries. On Christmas in 1995, Harry Potter saw Gilderoy in the hospital, slowly regaining his memory, saying he was so advanced that he could write joined up letters. Lockhart still gets fan mail, though he has no idea why.