I tend to think there's two types or aspects of racism - there's the ignorance-based xenophobia which us tribal humans will always apply to some 'other' group - this is part of human nature and crops up wherever there's scarcity, but is 'fixable' with knowledge and social fairness (socialism if you like). Casual ignorance-based racists tend to not be able to apply the racism directly to the friends of colour they always claim to have - they have to 'other' them first (eg "it's those
other muslims/jews/blacks/etc who i haven't come to regard as human that are the problem"). This type of unthinking xenophobia doesn't stop at race though, and is commonly applied today to benefit scroungers, 'chavs', jocks, immigrants or people with certain religions.
The other type of racism is the intellectual ideological version which we (largely) invented, and which the nazis ran with - the sort of racism that claims to speak from some body of knowledge that conveniently tells them the people they wanted to oppress anyway are deserving of that oppression, cos of science (or religion). Sort of like the difference between an average sun reader and rupert murdoch. This is still based on the underlying xenophobia, but it's knowingly evoked and utilised by people who 'should' know better, often for reasons other than those stated (eg imperialism, power, class allegiance etc). Many of these 'well-brought-up' intellectual racists probably don't even actually believe in it like the brownshirts they manage to convince to follow them (like politics in general).
That 'scientific' racism was actual science back then (a reminder that we shouldn't necessarily go to science for the answers to moral/ethical questions), but these days it's pretty much accepted that there's no way to easily define race using biology or genetics (even 'species' is getting slippery).
(to speak up for 'human nature' (whatever that is) - while i think a tendency to be xenophobic is part of our nature, i'm also convinced that cooperation, kindness, compassion and love are also part of that nature, and actually make up the larger part of it, and are probably the reason we're still on the planet (see Kropotkin) - even the racists will be lovely to the people of the wrong race they've found some reason not to 'other' (sorry for the american-style verb-isation (ya racist)). You can't really blame people for ignorance, only try and educate/love/patronise them into submission
[edit: IMO (i always forget that bit and probably sound like i think i know what i'm talking about

)]