According to Free Science, freckles and moles are the result of a localized concentration of melanin. Both freckles and moles are generally associated with pale skin.
In humans, according to Wikipedia, melanin is the primary determinant of skin color. Melanin is also found in hair, the pigmented tissue undeneath the iris of the eye, and the inner ear.
In the human body, the production of melanin, according to Wikipedia, is known as melanogenesis. It is through this process that allows the skin to begin to tan after exposure to ultraviolet rays. This is possible because melanin is a natural absorber of light, and able dissipate 99.9 percent of ultraviolet radiation.