Sit out in the sun too long and ultraviolet radiation from sunlight penetrates your skin and cells, damaging their RNA and DNA. This is bad news, as DNA provides our bodies with all the genetic instructions they need to develop, survive and go about their business, and this kind of DNA damage can lead to skin cancer. To protect you from this, your body helpfully tans, darkening the the skin with a pigment called melanin that reduces UV penetration into cells.

UV radiation stimulates the darkening of existing melanin and spurs increased melanogenesis, the production of new melanin. Cells called melanocytes generate the pigment and push it out of the cell, where it darkens the skin and absorbs and transforms absorbed UV energy into heat.

Melanogenesis results in a delayed tan that only becomes visible several hours after UV exposure and lasts longer than the tanning caused by darkening of existing melanin. Over time, a tan fades as darkened skin layers are pushed upward by new cells with less melanin, and are eventually scaled off.

Why do we get sunburn?

While we might say someone with sunburn was out “baking” too long or got “fried,” sunburns are different from the burn one might get from, say, touching a hot stove. That’s a thermal burn caused by the heat of the stove. While the sun does give off heat, a sunburn is caused by ultraviolet-B radiation.

When someone’s exposure to UV radiation exceeds their body’s ability to protect the skin with tanning, the radiation  causes damage to DNA, like we talked about above. This prompts the body to try and fix things. Bloodflow to the capillary bed of the dermis (the second outermost layer of skin) increases so cells can repair the damage, which results in warmth and redness of the skin. Inflammatory immune cells also flock to the damaged tissue, causing us to perceive pain and, hopefully, consider staying out of the sun for a while. Eventually, the damaged skin cells die, and the burned skin starts to peel.