Caffeine is stimulant that is used around the world to combat sleepiness. It is present in coffee, teas, sodas, and other supplements to help provide energy throughout the day. It is natural, but can also be synthetically produced.
Caffeine normally affects the body within about 30-60 minutes of consumption. It is efficiently distributed throughout the whole body and can cross the blood-brain barrier.
Inside the brain, it blocks a sleep-promoting chemical and can also interfere with the circadian melatonin rhythms. Caffeine has a half-life of 4-6 hours, which means that's how long it takes for approximately half of it to remain in your system. So, consuming caffeine in the evening could keep you up at night because of how long it takes your body to metabolize it.
Caffeine can have a significant impact on sleep, so it's important to understand how it works, and how you should be consuming it for optimal sleep health.