Within you are trillions of tiny little timekeepers that keep things running on a schedule. These timekeepers ensure that your body runs like a perfectly timed orchestra performing a musical masterpiece. Typically the performance goes smoothly, with nary a missed note or beat. However, messing with the timekeepers can ruin the performance. Messing with the conductor can make it downright terrible.
Every cell in your body contains genes that help you run on a 24 hour cycle. These genes are collectively called the circadian clock. The master clock, found in the brain, is the conductor of the orchestra.
Located in an area of the brain called the suprachiasmatic nucleus, the master clock naturally runs a little over 24 hours with or without feedback. When given feedback, it will run perfectly in tune with the light and dark cycles of the day. The master clock is set by exposing the eye to light during the day, specifically blue light, and then not, during the night.
The peripheral clocks, those found in cells outside the central nervous system, work in concert with the master clock to help your body run like that well-tuned and timed orchestra. The clocks effectively group cells with common and complimentary functions together so that when one cell sends a signal, the other is ready to receive it and respond appropriately.
These clocks are more in tune with energy metabolism than light. They also integrate multiple systems together to ensure that energy metabolism, hormone secretion, immune function and basically every biological process in your body works properly.