Caffeine changes the chemistry of your brain, blocking the action of a natural brain chemical that is associated with sleep.
Caffeine binds adenosine receptors that cause drowsiness by slowing down nerve cell activity. The nerve cells cannot sense the adenosine anymore because caffeine is taking up all the receptors adenosine binds to. Soon, you will have increased neuron firing in the brain. The pituitary gland sees all of the activity and releases hormones that tell the adrenal glands to produce adrenaline (epinephrine). Adrenaline has a number of effects such as dilation of your pupils, faster beating of the heart, and tightening of the muscles ready for action.