Hyperpigmentation can be formed when there is an allergic reaction, irritation, inflammation, infection, injury, or sun exposure. The damage causes melanocytes in the stratum basale of the epidermis to produce excess melanin as a defense mechanism. Thus, you have hyperpigmentation.
Melasma comes in all sizes, from spots, to patches, to larger section of the face. Depending on the severity of condition a hydroquinone product can be used to resolve the hyperpigmentation.
To correct hyperpigmentation you can use one or a combination of skin lighteners to inhibit melanin formation: Hydroquinone is the gold standard for skin lightening.
To protect and prevent future darkening:
1) You should use a broad-spectrum sunscreen with SPF 15 or greater and re-apply after swimming, excessive perspiration, or every 2 hours for optimal sun protection. UV rays can darken the skin as well as significantly increase the risk of skin cancer. It is imperative that you are diligent and liberal with your sunscreen. Re-apply - or else all of your skin lightening and money will be in vain.
2) Avoid the sun from 10am to 4pm because that is the time when the suns rays are the most intense.
It can take 1-2 weeks to see improvement depending on the severity of the condition and how diligent and compliant you are.
If you have stubborn hyperpigmentation, then the best product to use is hydroquinone 4% with or without retinoid or steroid.