First off, a disclaimer...I do not use, and have no tolerance for those who use, the terms "racism" or "racist". This comes from a long-held belief imparted upon me by my mother in my early childhood, that there is only one race--the human race. Any perception or misperception of differences between those of different skin color, based solely upon skin color, is prejudicial in nature and based on upbringing and experience.
The prejudicial mindset is actually a mental time-saving and survival mechanism built into the human brain. It saves us from having to repeatedly burn ourselves touching hot ovens by subconsciously "pre-judging" them to be a source of pain, and we learn to check them first. By the same token, interactions with people teach us over time to "pre-judge" them, based on appearance, behavior and yes, skin color.
Prejudicial behavior is developed over time and embedded into our sub-conscious. Any prejudice is either reinforced or attenuated as experience is gained. When a positive experience occurs, we tend to migrate towards those situations or people, to subconsciously seek out those experiences. Likewise, a negative outcome reinforces the subconscious to "steer" us away from those situations or people that led to the negative experience.
What is a natural human behavior has become that which is all too frequently, and all too mistakenly, called "racism". It is only once it is understood that it can be intellectually addressed and put to positive use within society.