The skin is composed of multiple layers, primarily the epidermis and the dermis. UV radiation can cause significant damage to these layers. UVA rays penetrate deep into the dermis, leading to photoaging and DNA damage, while UVB rays primarily affect the epidermis, causing sunburn and contributing to skin cancer.