When your skin is exposed to the sun, your body produces something called Melanin. Melanin is your body’s natural defense against the sun. The Melanin makes your skin darker. The darker a persons skin is, the longer they can be exposed to the sun. So, to make a long story short, when your skin gets darker (tans) that is actually the Melanin produced by your body.