Ron Weasley's character is consciously written as some what racíst. Not as racíst as Malfoy, of course - he doesn't scoff at mudbloods and half-bloods, and he doesn't see himself as superior at all. Still, he unquestionably accepts the inferior position of the house elves ("They love serving."), when he finds out Lupin's a werewolf his reaction is not only scared but disgusted ("Don't touch me!") and he is clearly uncomfortable founding out Hagrid's half-giant ("Giants are wild and savage.")
And this is brilliant. Because it shows racîsm isn't only present in clearly malicious and evil people, in the Malfoys and Blacks - it's also there in warm, kind, funny people who just happened to learn some pretty toxic things growing up in a pretty toxic society. And they can unlearn them too, with some time and effort. Ron eventually excepts Hagrid's parentage, lets Lupin bandage his legs, and in the final battle, worries about the safety of the house elves. Some people are prejudiced because they are evil, and some people are prejudiced because they don't know better yet. And those people can learn better and become better people. And that's an important lesson. The lesson taught about discriminations shouldn't be "only evil people do it," because then all readers will assume it doesn't apply to them. Instead old J.K. teaches us, "You too are probably doing it and should do stop ASAP."
This isn't mine but I loved this, and I just fluffing had to post this.