In a wonderful Ted Ed lesson written by educator Hanan Qasim and animated by Adriatic Animation, the purposeful pharmacological effect of caffeine is explained, specifically how it works in the human body to promote wakefulness.
In the human body, caffeine acts as a stimulant for the central nervous system. It keeps us awake by blocking one of the body’s key sleep-inducing molecules,
a substance called adenosine. …Caffeine is what’s called an adenosine receptor antagonist.
That means it derails this process of slowing your neurons down.