The Bible does not explicitly give us the origin of the different “races” or skin colors in humanity. In actuality, there is only one race—the human race. Within the human race is diversity in skin color and other physical characteristics. Some speculate that when God confused the languages at the tower of Babel (Genesis 11:1-9), He also created racial diversity. It is possible that God made genetic changes to humanity to better enable people to survive in different ecologies, such as the darker skin of Africans being better equipped genetically to survive the excessive heat in Africa. According to this view, God confused the languages, causing humanity to segregate linguistically, and then created genetic racial differences based on where each racial group would eventually settle. While possible, there is no explicit biblical basis for this view. The races/skin colors of humanity are nowhere mentioned in connection with the tower of Babel.
After the flood, when the different languages came into existence, groups that spoke one language moved away with others of the same language. In doing so, the gene pool for a specific group shrank dramatically as the group no longer had the entire human population to mix with. Closer inbreeding took place, and in time certain features were emphasized in these different groups (all of which were present as a possibility in the genetic code). As further inbreeding occurred through the generations, the gene pool grew smaller and smaller, to the point that people of one language family all had the same or similar features.
Another explanation is that Adam and Eve possessed the genes to produce black, brown, and white offspring (and everything else in between). This would be similar to how a mixed-race couple sometimes has children that vary in color. Since God obviously desired humanity to be diverse in appearance, it makes sense that God would have given Adam and Eve the ability to produce children of different skin tones. Later, the only survivors of the flood were Noah and his wife, Noah’s three sons and their wives—eight people in all (Genesis 7:13). Perhaps Noah’s daughters-in-law were of different races. It is also possible that Noah’s wife was of a different race than Noah. Maybe all eight of them were of mixed race, which would mean they possessed the genetics to produce children of different races. Whatever the explanation, the most important aspect of this question is that we are all the same race, all created by the same God, all created for the same purpose—to glorify Him.