The colour in our skin is provided by melanin. It is uneven distribution of melanin which leads to the development of pigmented lesions such as include moles, freckles, age spots, or melasma (a dark, patchy discolouration).
Generally speaking these patches of pigmentation relate to various degrees of damaged skin. Sun exposure is the main contributory factor, but blemishes could be caused by genetics, life cycle, hormonal changes or other factors.