UVB is the type of UV ray that causes sunburns, while UVA is the type of UV ray that penetrates glass and can cause long-term damage to the skin.