Racism is a form of collectivism that ascribes moral and political significance to an individual’s race and/or ancestry (instead of the individual’s choices/actions and their nature as a rational being.)
Writes Ayn Rand on the nature of racism:
“Racism is the lowest, most crudely primitive form of collectivism. It is the notion of ascribing moral, social or political significance to a man’s genetic lineage—the notion that a man’s intellectual and characterological traits are produced and transmitted by his internal body chemistry. Which means, in practice, that a man is to be judged, not by his own character and actions, but by the characters and actions of a collective of ancestors.” 
What is racism? Racism is a form of collectivism that judges an individual by their ancestral heritage/race, as opposed to one’s nature as a rational being. Racism stands in opposition to the method of individualism — judging each human being as an individual, i.e., by the content of one’s character and actions, and not by their skin color and ancestry.
Politically, the only protection an individual needs from racists is the protection of their rights — freedom from the initiation of physical force, whether it be a knife held at one’s throat by a Black Panther or the noose held by a member of the KKK. Capitalism is the only social system that “defangs” the political power of racists by banishing the initiation of physical force.
Observe the great American “melting pot” where the warring tribes of Europeans who were busy killing each other in Europe, were able to live relatively peacefully together when they moved to America. What principle was the cause of this? Politically, the principle of individual rights — the foundation of capitalism.
The principle of individual rights and its underlying individualism is being eroded as the new racists of today, who are advocating that some individuals be granted political privileges based on their skin color and ancestry, i.e., affirmative action, racial quotas, etc. Under capitalism, such racist policies — carried out by the power of government — would be outlawed.
Observe that a complaint about capitalism is that “all the capitalist cares about is money” in one sense is true when one observes that those who care about money regarding their business, care naught about the color of their customer/employee as long as they deliver payment/perform their job. Money and profit are color-blind.
 Ayn Rand “Racism,” The Virtue of Selfishness
For further reading and study:
- See Ayn Rand’s brilliant essay “Racism” in the Virtue of Selfishness and her article “Global Balkanization” in The Voice of Reason.