Freckles are clusters of the pigment melanin. It is produced by melanocytes deep in the skin, with greater concentrations giving rise to darker skin tones, and hence, ethnicity. Melanin protects the skin against harmful ultraviolet radiation, but is also found in other locations around the body, such as the brain. Freckles are mostly genetically inherited, but not always. They become more prominent during sunlight exposure, as the melanocytes are triggered to increase production of melanin, leading to a darker complexion. People with freckles generally have pale skin tones, and if they stay in the Sun for too long they can damage their skin cells, which sometimes leads to skin cancer like melanoma.
Answered by Aneel Bhangu