
The best way to understand the way that skin discoloration occurs is to understand how the skin gets and maintains its color. The epidermis, the outer layer of your skin, contains a bunch of cells called melanocytes. These cells have many functions, but one of their main jobs is to protect the skin. When it comes to protecting the skin from the sun, the melanocytes do so by darkening it with a pigment called melanin.
Melanin is responsible for making the skin look darker when you are exposed to the sun, but the body, for some reason, will either stop producing melanin in specific areas of the skin, or put its production into overdrive. Sometimes the skin discoloration can affect the entire body, a specific part of the body, or it can occur in just a few random places on the skin