As a former psychology major and current sociology major, I've seen this discussed many times. While most people want to be politically correct nowadays and say it's all learned, I'm not quite buying into that.
I don't think "racism" is inherent, mind you. I do, however, think that, as you said, we have a natural tendency to see like and dislike. A circle is like an oval, but not like a square, for example.
I seem to recall something I learned in my psychology class, I can't recall if it was gen psych or personality psych, but kids don't usually register color until around 4 or maybe a little later.
That's part of the reason you won't generally see kids give descriptions of, "He was a big, black/white/etc man." You'll normally see, "He was a big man." and maybe some distinguishing features.
I'd say that your friend's kid may have just had a bad experience around a black kid around his age, or he's buying into the stereotypes of black people and doesn't like that. I know when I was about 8 or so, a black kid tried to rough me up and kept calling me "Whitey." and "Cracker." and stuff like that. I'd be lying if I said I didn't have a sore spot about for a little bit, but some of my best friends growing up were black, so I'm not sure what to say.
I'm not going to say it's purely nurture, but I'd say that nurture holds the vast majority of the influence. Remember, just because someone might be predisposed to it psychologically, doesn't mean that they will do it.