A DNA change tens of thousands of years ago when man left Africa began the first traces of white skin in the human population and it started with one individual. How did this change happen? Well, let's look at one culprit.
The gene for hypertrichosis, or "wolf man disease" was begun in the Canary Islands in the medieval times in one family of Spanish settlers. The Spanish arrived to the islands in the 1400s to find a tribe of natives called Guanche who were tall people with pale skin and red and blond hair. The interesting thing about these people is that they seem as if they were stranded there. They had no use or knowledge of boats, even though the islands were close by. How did they get there? How did they get that height and coloring? It would appear there was some breeding going on in a race of travelers. That's a whole different story. For now, just know that the Spanish killed off most of the men in the tribe and sickness killed a lot of them, and they mated with the women that were most unusual and unique. This hairy man gene showed up in this Spanish family there and spread throughout the world as the family moved and bred around the globe. It took just one mating with a unique human to create this interesting gene.
In the case of white skin, something as obvious as Neanderthal would explain that, seeing as to how Neanderthal had left Africa many hundreds of thousands of years earlier and adapted to a climate that was not like Africa.
In the scheme of things, those of us with white skin ended up part of a mutation, a variant that allowed us to live in more northern climates, accruing more necessary vitamin D in a climate that showed the sun very little. It is functional and another example of evolution helping us adapt a practical change if we're going to be ridiculous enough to live in climates with little sun and snow.