Summarize this article in one sentence.
Exposure to UV rays is one of the most common causes of dark spots. No matter what kind of dark spots you have, staying out in the sun too long can make the problem worse. As far as prevention goes, staying away from these harmful rays is the best thing you can do to protect yourself. Take the following measures to keep your skin safe from too much exposure to UV rays:  Wear sunscreen. Even in the winter, wear sunscreen on your face with SPF 15 or higher. In strong, direct sun, wear a hat and sunglasses. Cover the rest of your face with strong sunscreen. Don't use tanning beds. The direct exposure to UV rays is harmful to your skin (as well as internal organs). Don't sunbathe. When your tan fads, dark spots will be left behind. If you have melasma that's caused by medications you're on, you might be able to get rid of dark spots by switching to a different medication. Talk with your doctor to discuss your concerns and see if there's something else you could take that doesn't have this side effect. Hyperpigmentation can result from a skin treatment that wasn't properly administered. Plastic surgery or deep chemical peels can end up leaving dark spots behind. Before you get any kind of skin treatment, do thorough research to make sure the technician or physician has plenty of experience in the area and a good track record. Whenever you find a pimple on your face, do not try to press, rub or touch it. The more you touch a pimple, the more are the chances of developing a dark spot. Remember, dark spots arise as pimples vanish!
Limit your sun exposure. Take stock of your medications. Watch out for professional skin treatments. Keep your hands off your face.