Simply put, freckles are just areas of concentrated pigment. You see, cells in our skin called melanocytes produce melanin, which is the same pigment that colors our hair and eyes, and in some people these cells tend to clump together.
Now if we wanted to get our science on, we'd call freckles ephelides. (There are two types of freckles - ephelides and lentigines - this video focuses on ephelides.) I'm going to call them ephelides just because I think the name is kind of pretty.
Anyway, no one is born with ephelides - they develop over time as two things come into play.
The first factor is genetics. We know that at least one gene is responsible for a speckled appearance and that people with light skin and red hair are more likely to get ephelides.
The second key ingredient is sunlight. Exposure to the sun cues the cells to kick into high gear and produce more melanin. The reason is that the pigment both absorbs and reflects the sun's harmful UV rays and protects our DNA from getting damaged and our skin from getting burned.
The end result is that existing ephelides darken and new ones pop up, so they are a good indication of whether or not you might be getting too much sun - trust the ginger on this one.