The sun emits two types of UV rays that reach the Earth's surface: UVA and UVB. UVA rays penetrate deeper into the skin and contribute to aging and wrinkling, while UVB rays are primarily responsible for sunburn. Both types of UV rays can damage the DNA in skin cells, which can eventually lead to cancer.