Which component of skin protects against UV light?

The melanin pigment in the skin protects against UV light.