Caffeine works by blocking adenosine, which is why it can help fight off sleepiness. It does this by binding to the same receptors that are activated when your body binds its own endocannabinoids.
When someone drinks coffee on a regular basis, their body becomes used to the effects of caffeine which means that they build up what’s called ‘tolerance’ towards its stimulating effects which results in needing more than usual to feel stimulated.