Melanin is the pigment responsible for skin, hair, and eye color — and it's also the body's direct response mechanism to UV exposure, which is the actual biological process behind tanning.
The tanning response
UV exposure triggers skin cells called melanocytes to produce more melanin, which darkens the skin over the following days — a tan is literally the skin's visible defense response to UV damage, not a purely cosmetic effect.
Two types of melanin
Eumelanin (brown-black) and pheomelanin (red-yellow) exist in different ratios across skin types — eumelanin provides more UV protection, which is part of why darker skin types have naturally higher baseline sun protection.
Why a tan isn't full protection
Even a developed tan provides only a modest amount of additional SPF-equivalent protection — nowhere near enough to skip sunscreen, which is why SPF matters throughout a tanning routine, not just before you've developed color.
Does a tan protect against future sunburn?
Only marginally — a natural tan provides roughly the equivalent of a very low SPF, far less than a proper sunscreen, so it shouldn't be relied on as meaningful sun protection on its own.