People get freckles through a combination of genetics, exposure to the sun and age. Fair-complexioned people are more prone to getting freckles. They have less melanin, and melanin protects the skin against damage by reflecting and absorbing ultraviolet rays such as those the sun produces.
Light-complexioned people (particularly children) get more freckles when their melanin goes into overproduction after their skin is exposed to the sun. Some of the melanin may clump, resulting in freckles. Freckles are simply heavy clumps of melanin.
Some freckles tend to diminish in the winter and reappear in warmer months. Others stay constant. However, as people age, their freckles may fade.