Melanogenesis is the natural biochemical process responsible for production of the skin pigments that give the skin color and protect it from UV radiation.
This process can be affected by exogenous and/or endogenous factors that lead to localized overproduction of melanin, causing unsightly blotches and uneven skin tone.
The main cause of melanin overproduction is exposure to the sun. However, genetic factors, hormonal factors, skin aging, photosensitizing agents, etc. also play a role.