Starting out, the story talks about an orphaned boy who had to be raised by his abusive aunt and uncle, whom disliked him for something he had no idea about. When he finally learned who he was and where he came from, Harry started to soar through magic - though not always passing his classes. He began to learn about the world that he came from and growing in his own opinions about said world.
One such example of this would be the matter of pureblood verus un-clean blood. I only use the term un-clean as a term to describe those who are not FULL wizard. Let me explain further:
In the wizarding world there are several types of wizard: the purebloods - those who's ancestors have been wizards since the beginning of time-, half-bloods - someone who was born of a pureblood wizard and a mud-blood, which leads me to: mud-blood - a wizard who was conceived of two muggles - or non-wizarding folk.
These bloodlines seem to come into the story line often. Being that Harry Potter himself, was a half-blood - born of one pureblood line: the Potters, and one mud-blood line: the Evans; and his best friend Hermione herself was a mud-blood.
Examples of this racist slur can be seen as early as the second book, when Draco Malfoy calls Hermione a "mud-blood" to her face. Now, this may not seem like it is anything of importance, but calling someone a mud-blood is the equivalent of calling an African American person the "n word". By showing this in something as trivial as a children's book, it teaching children at an early age that judging someone based on their race or blood is wrong. The reactions in the book when Malfoy calls her a mud-blood are that of what you would expect from if someone was to greatly insult someone else. Fred and George Weasley were ready to fight and Ron casts a slug-curse without a second thought.
Racism in Harry Potter is what the entire story line is based around. Even though it may be a children's book, its events can be loosely resembled to the events of real life. Such as the case where He-Who-Must-Not-Be-Named, the all-time bad guy in the series, decides that the only race that should continue should be those of only pure blood. He-Who-Must-Not-Be-Named in this case resembles that of Hilter in WWll. He only wanted the purest lines, with blonde hair and blue eyes, and He-Who-Must-Not-Be-Named only wants those who's bloodlines have all been wizards before him; even though he himself was a mud-blood.