Your body pumps a lot of extra blood to the burnt area to repair and replace the damaged cells. It’s this supply of extra blood that causes redness and a feeling of heat.
So, proper skin protection is essential. Adults should cover their body with about a handful of sunscreen (with a high enough SPF) and repeat this every two hours and after every shower or swim. Also, try to stay out of the sun during the hottest time of the day and regularly spend time in the shade. UV protective clothing and a sun hat offer protection too.
As for the difference between UVA and UVB rays, the former accelerate skin ageing and the latter cause you to burn.