Lack
of empathy & compassion for those who are "different" is the
culmination of indoctrination (or even worse) an upbringing fostered on
misdirected rage: "If I can't have the things that make me happy, I'm
going to take your happiness from you."
As long as people believe that they are "different" from "other people", there's potential for racism.
The trick is to realize that different doesn't always mean something is better or worse - sometimes they're just different.
That's how racism works - thinking you're better than somebody else.