Tom Riddle applyed for the posistion after he graduated from Hogwarts. He was denied when Headmaster Armando Dippet was the headmaster. After a short-while, Albus Dumbledore became Headmaster, and Tom Riddle applyed to be the Defense Against the Dark Arts professor but was denied because Dumbledore knew about his tedious ways and rejected him. Tom Riddle after being rejected for the posistion put a Jinx on the posistion, Defense Against the Dark Arts jinx. Which makes the teacher unable to hold the posistion of Defense Against the Dark Arts for more than one year.
During the first year Harry Potter was at Hogwarts School of Witchcraft and Wizardry, his teacher was Quirinus Quirrell. He taught them about Curse of the Bogies, the Knockback Jinx, and the spell Lumos. As the year came to an end, so did Professor Quirinus Quirrell, he died trying to protect his master in the Philosophers Stone.
During the Second Year, Harry Potter was at Hogwarts, his teacher was Gilderoy Lockhart. During his second year, Gilderoy Lockhart taught them no valuable spells or defensive charms. He taught them about all of his books, and his life. Which was completley false, as he was "rather gifted in memory charms" he would get the stories out of people, then he would use memory charms, (Eg. Obliviate ) Gilderoy Lockhart was put as a permanent resident in St. Mungos for magical Maladies and Injuries in the Janus Thickey Ward as his teaching ended.
During the Third Year Harry Potter was at Hogwarts, his teacher was Remus Lupin. During his third year, Harry was taught the Patrnonus Charm unlike his other students, he taught Harry. He taught all of his students about the Boggart and the spell, Riddikulus. He taught his students about Dark Creatures. Remus Lupin later quit because the fact that he was a Werewolf and most students parents wouldnt want their children to be taught by a werewolf.
During the Fourth year, Harry Potter was at Hogwarts his teacher was Barty Crouch Jr. in disquise under Polyjuice Potion as Alastor Moody. During this year, the students were taught about the three Unforgivable Curses. Barty Crouch Jr. Was soon discovered and was sent for the Dementors-Kiss and sentenced to life in Azkaban for torturing Aurors Frank and Alice Longbottom.
During the Fifth Year, Harry Potter was pretty uneasy. Dolores Umbridge was the teacher, and as she was a spy for the Ministry of Magic she was afraid Dumbledore was forming an army to take over the Ministry. She taught them "Basics for Beginners" which had as Hermione mentioned "no defensive spells." Harry Potter formed an organization known as Dumbledores Army which helped the students get a grasp on how to defend themselves from Dark-Wizards and the Dark-Arts. They were later caught and punished by Cho Chang and Marietta Edgecombe and the Dumbledoes Army Parchment Jinx was triggered.
During the Sixth Year, Harry Potter was at Hogwarts his teacher was Severus Snape. Snape was cruel too his students, and didnt teach them much but made them write essays about "resisting the Imperius Curse ". He also made them write about "how to defend against Dementores ". He also taught them about how to do Nonverbal Spells. Severus Snape was fled the school after he killed Albus Dumbledore in the Battle of the Astronomy Tower. In this year, you also learn how to Apparate.
During the Seventh Year, Harry didnt attend Hogwarts. The teacher was Amycus Carrow. After he was the professor he renamed the subject Dark Arts. He taught the students how to use the Unforgivable Curses. On which he used on the students who got detention. Draco Malfoy and Vincent Crabbe and Greggory Goyle all excelled in this subject. After which Amycus Carrow was tied up with his sister Alecto Carrow and after which they were senteced to Azkaban for life. In this year, students are allowed to learn Apparation.