Melasma may not always need treatment as some spots will go away in time or with the change of hormones. However, if necessary, a doctor can prescribe certain topical creams and medications. If this does not work, a dermatological procedure, such as a chemical peel or dermabrasion, may be performed. Some laser treatments can also reduce the effects of melasma.
There is no real prevention for melasma other than proper skin care, such as wearing sunscreen and practicing other forms of safe skincare.
American Academy of Dermatology