Harry Potter as a hero, is a great teacher. He teaches us several lessons throughout the series. I am going to discuss a few here.
BRAVERY/COURAGE
Well, this one is, no doubt, the most evident and the important one of all the lessons taught by Harry. He shows his valor, time and again from the age of eleven. There are several examples for the same. He was just eleven when he faced the darkest wizard of all times, Lord Voldemort, and defeated him too saving the philosopher's stone and preventing Voldemort to return. In his second year, he along with Ron and Hermione solved the mystery of the Chamber of Secrets and it must have required a lot of courage to go down into the chamber alone to save Ginny. His acts of bravery do not end here, rather there are several more. During his third year, he went against the Ministry to save Buckbeak and Sirius Black, his innocent Godfather. He was the one who saw Lord Voldemort return during his fourth year fought him and also escaped. In his fifth year, Harry went to the ministry to save his Godfather(which was a trap by Voldemort) along with his friends(Ron, Hermione, Ginny, Neville, and Luna). It required a lot of bravery for all of them with Umbridge as the head of Hogwarts and the Ministry against Harry. He along with Ron and Hermione started hunting down the Horcruxes and destroying them on the orders of Dumbledore when he was just seventeen. These are just the most evident ones but several more incidents show his chivalry.
SELFLESSNESS
The next on my list is selflessness. This is again one of the most perceptible traits of our hero. Harry is shown to be extremely selfless in various situations. During his second year when he was only twelve, he risked his own life to save Ginny, Ron's younger sister. Then, he again risked his life in the Room of Requirement to save Draco Malfoy and Goyle who he never liked or rather hated. However, the biggest act of selflessness was shown by him when he sacrificed himself for the safety and the well-being of the wizarding world. He selflessly walked into the Forbidden Forest, to Voldemort, to get himself killed so that the Horcrux inside him gets destroyed. This is the greatest show of selflessness. Harry's sacrifice activated the most powerful magic(love) which protected his allies from any harm.
All these examples are pieces of evidence of Harry's selflessness.
KINDNESS
Besides being brave, courageous, and selfless, our hero is kind too. His acts of kindness are uncountable. Harry freed Dobby from the Malfoys, saved Peter Pettigrew's life after what he did to his parents and Sirius, forgave Ron for not trusting him, saved Dudley's life even after the bad treatment he got from him, wants the Dursleys to take protection, gives the remaining liquid luck to his friends after using some to get the Slughorn's memory for Dumbledore and gives one last chance to Voldemort and asks him to remorse and many more.
NEVER BE TOO CONCIETED
Harry is shown to be an extremely famous person in the Wizarding World for defeating the Dark Lord.
Such popularity could have blown anyone's mind but he never took it as a great thing. He was never shown to be very happy or proud about his popularity. Sometimes, he even hated it. This shows his down-to-earth nature. Harry never boasted or bragged about himself which makes him a wonderful person.
LOVE OVER POWER
Love is one of the most important themes of the series. While the villain of the story is shown to crave nothing but power, the hero wants only love. Harry never wanted power or popularity. All he wanted was love and family. He was never tempted to power even when he had the most powerful wand(the Elder wand) serving its allegiance to him; not even when he had all the three deathly hallows. Even Dumbledore admitted that he was not to be trusted with power or he was tempted to it, but Harry is never shown to crave power. He is truly a perfect hero.
These are only some of his traits and lessons we learn from him. All these make him an ideal hero and a role model for all.