I don't think being racist is tied to any age group or generation or any level of formal education. It is a reaction to the "otherness" of the unfamiliar. When cavemen saw strangers approaching, they instinctively took a good grip of their cudgel, or picked up a rock, ready to defend their foraging territory from marauders.
Once they ascertained that they came in peace they could relax a bit, but first they had to get to know the newcomers, and that took time. The more people mix with others of different races to themselves, the less they see them as "other". You can pass laws making racism a crime, but until no-one perceives "other" as "bad" there will always be someone whose reaction is, "'Ere comes a stranger, 'Eave a brick at 'im". It is improving, gradually.
Of course, the way people are perceived is very much affected by previous history. If they have been bloody wars, then the old enemy isn't instantly converted into a friend overnight. If those of another race have been mostly servants, paid or unpaid, or used as slave labour (whatever their colour or nationality ) then it is easier to see them as inferior than as equals, and to treat them badly. Conversely, if they were the conquerors, then resentment against them continues long after their power is over.