Hmm... wonder where they learned that from
Varied reasons. In Central America (i.e. El Salvador, Guatemala, Honduras, Costa Rica,Nicaragua etc), social stratification can be traced to colonial practices by the Spaniards/Portuguese (peninsulares etc). In Africa it might take the form of stereotypes developed through mass media. Very much like how people tend to associate Africa in general with indigenous tribes, mud huts and stuff. Then you have the caste system in India which some have sought to justify through religion (although I suspect, prevailing cultural practices were simply incorporated into scripture) and so on and so forth.
Personally I think it's in the nature of humankind to seek superiority to one's neighbor and skin color just happens to be the most visible. If we were all of the same skin color, I'm quite confident we will find another reason (wealth, intelligence, sex, gender etc) as a basis for discrimination. Amongst most discriminated groups, there is discrimination within the group itself. Consider the stratification in feminist groups between educated feminists and the uneducated or the homophobia that exists amongst the African American community and amongst Africans.
In my experience, when people fight for equality, they are not so much fighting for the equality of humans in general but simply for the group in question to be accepted as equal to those who deem them inferior in the status quo. Upon achieving equality, they often turn around to discriminate. An example would be the Irish for whom the original concept of racism (according to some scholars) was invented by the British to discriminate against. Consider the case of Mexican illegal immigrants seeking rights in the United States when immigration policies in Mexico are far worse than that of the United States.
There's a certain irony concerning all this which would be hilarious if the effects of discrimination weren't so serious.