I dont think you can "beat" racism. I think its something that comes from growing up and seeing behavior you think is negative from a certain group of people.
Maybe some humans are not built to get along with everyone. We tend to like people who are similar to ourselves.
I havent seen many discussions about why people are racist. Clearly some of them are, and maybe we would be also if we grew up with their experiences.
I dont think you are born a racist. Its something society does to you growing up. Could be low emotional intelligence but seems like a bit too easy to explain it that way. Many very intelligent people are racists also, clearly.