You need to limit your time spend in sun light to avoid the UV lights. Always wear protective clothing to protect your skin from sun. You need to use sunscreen as well when going outside.
You need to use products with sun protection factor about 15. It will save you from the direct effect of sun light. Mostly you need to apply sun screens after 2 hours while swimming. However, The Academy of Dermatology recommends to use sun screens up to 30 SPF.