@AmiePanda I’m interpreting your question as why are people different colours. The answer to that is that skin colour is determined by the amount of something called melanin, which is a dark brown to black pigment. Melanin protects the skin from the suns harmful ultra violet radiation, so people in hotter countries have more of it and therefore tend to be darker skinned.
As Lidunka says, skin colour is controlled by a pigment called melanin.
Everyone’s skin needs to absorb sunlight to generate vitamin D and other important nutrients. Lots of melanin in the skin (i.e. darker skin) stops the sunlight from being absorbed by the skin cells. Way back when humans evolved, people who lived in cold countries that didn’t get much sunlight needed their skin to absorb as much sunlight as possible, so their skin turned very light in colour, with no melanin to block sunlight from being absorbed. People who lived in warmer countries got more sunlight, so their skin didn’t need to absorb as much, and their skin turned darker in colour.
Nowadays, thanks to the amazing ease of travel across the world, people with all skin colours live in all countries. You’ll notice, though, that some people who are fair-skinned can tan if they spend too long in the sunlight. That’s their skin turning dark to protect them from absorbing too much harmful ultraviolet radiation!
(Of course, some people like me are very very pale skinned and we don’t tan – we just burn from the ultraviolet radiation before our skin has a chance to generate enough melanin to protect us…)