Short answer
Islam forbids racism. The Qur'an tells all mankind that God (﷾) made them into nations and tribes so that they would know one another. The most honoured in God's (﷾) sight is the most righteous, not the best-born. The Prophet (ﷺ) said that God (﷾) does not look at people's faces or wealth, but at their hearts and their deeds. A Companion, one of the earliest followers of the Prophet (ﷺ), once insulted a man and shamed him over his mother, who was not an Arab. The Prophet (ﷺ) told him he still had a trait from the time before Islam. He chose Bilal, a freed African slave, to call the Muslims to prayer. Umar, who later ruled the Muslims, called Bilal "our master". Each year at the Hajj, the pilgrimage to Mecca, pilgrims of every race and nation worship side by side. The men wear the same two plain pieces of cloth.
Full explanation
One family, many nations
The Qur'an speaks to all mankind, not to one people. It says every human comes from one male and one female. It says nations and tribes exist so people may know one another. Honour with God (﷾) comes from righteousness alone. The Qur'an counts the variety of languages and colours among God's (﷾) signs. It also forbids believers to mock one another or use insulting names.
“O mankind! We created you from a single (pair) of a male and a female, and made you into nations and tribes, that ye may know each other (not that ye may despise (each other). Verily the most honoured of you in the sight of Allah is (he who is) the most righteous of you. And Allah has full knowledge and is well acquainted (with all things).”
“And among His Signs is the creation of the heavens and the earth, and the variations in your languages and your colours: verily in that are Signs for those who know.”
“O ye who believe! Let not some men among you laugh at others: It may be that the (latter) are better than the (former): Nor let some women laugh at others: It may be that the (latter are better than the (former): Nor defame nor be sarcastic to each other, nor call each other by (offensive) nicknames: Ill-seeming is a name connoting wickedness, (to be used of one) after he has believed: And those who do not desist are (indeed) doing wrong.”
God (﷾) looks at hearts, not faces
The Prophet (ﷺ) said that God (﷾) does not look at faces or wealth, but at hearts and deeds. Colour, lineage and money count for nothing in God's (﷾) judgement of a person.
Abu Huraira reports that the Prophet (ﷺ) said: Allah does not look at your faces or your wealth, but He looks at your hearts and your deeds.
A message for every people
The Prophet (ﷺ) was told to say that he was sent to all mankind. He said that earlier prophets were sent to their own nations only, but he was sent to all people.
“Say: "O men! I am sent unto you all, as the Messenger of Allah, to Whom belongeth the dominion of the heavens and the earth: there is no god but He: it is He That giveth both life and death. So believe in Allah and His Messenger, the Unlettered Prophet, who believeth in Allah and His words: follow him that (so) ye may be guided."”
Jabir ibn Abdullah reports that the Prophet (ﷺ) named five things given to him that no prophet before him was given. The last of them: every earlier prophet was sent to his own nation only, but he was sent to all mankind.
A Companion rebuked for shaming a man over his non-Arab mother
The Arabia the Prophet (ﷺ) found was proud of its tribes and bloodlines. Even Abu Dharr, a devout Companion and one of his early followers, once insulted a man. He shamed him over his mother, who was not an Arab. The Prophet (ﷺ) told him that he still had some of the ways of the days of ignorance, the time before Islam. He also told him that slaves are their masters' brothers. They are to be fed and clothed as their masters are.
Abu Dharr insulted a man and shamed him over his mother. The Prophet (ﷺ) told him he still had some of the ways of the Days of Ignorance. He said that their slaves are their brothers: they must feed them from what they eat, clothe them as they dress, and not load them beyond their strength, or else help them.
Abu Dharr reports that he quarrelled with a man whose mother was not an Arab, and spoke ill of her. The Prophet (ﷺ) asked whether he had spoken ill of the man's mother and told him he still had a trait of the days of ignorance. He added that servants are their masters' brothers.
Bilal, a freed African slave
This was not only a slogan. The Prophet (ﷺ) chose Bilal, a freed African slave, to give the call to prayer. Umar went on to rule Arabia and far beyond it. He used to say that Abu Bakr, the first ruler after the Prophet (ﷺ), was their master and had freed their master, meaning Bilal.
Ibn Umar reports that when the Muslims in Medina discussed how to call people to prayer, the Prophet (ﷺ) told Bilal to stand and give the call.
Jabir ibn Abdullah reports that Umar used to say: Abu Bakr is our master, and he set free our master, meaning Bilal.
The Hajj
The Qur'an calls all people to the pilgrimage, from every distant land. Each year pilgrims from every continent and race stand together at Mecca in the same rites. The men wear the same two plain pieces of cloth, so rank and nation cannot be seen.
“"And proclaim the Pilgrimage among men: they will come to thee on foot and (mounted) on every kind of camel, lean on account of journeys through deep and distant mountain highways;”
Perspectives
The Islamic perspective
All people descend from one pair and are equal before God (﷾). The only rank that counts is righteousness. The Prophet (ﷺ) condemned tribal pride, honoured a freed African slave, and brought a message for every nation.
The Qur'an says nations and tribes exist so people may know one another. The most honoured with God (﷾) is the most righteous.
The Qur'an counts the variety of human languages and colours among God's (﷾) signs.
The Prophet (ﷺ) taught that God (﷾) looks at hearts and deeds, not at faces or wealth.
The Prophet (ﷺ) rebuked a leading Companion for shaming a man over his non-Arab mother. He called it a trait of the days of ignorance.
Umar called Bilal, a freed African slave, "our master".
The Prophet (ﷺ) was sent to all mankind, not to one nation.