In the HowStuffWorks article How Sleep Works, the action of adenosine is discussed. As adenosine is created in the brain, it binds to adenosine receptors. The binding of adenosine causes drowsiness by slowing down nerve cell activity. In the brain, adenosine binding also causes blood vessels to dilate (presumably to let more oxygen in during sleep).
To a nerve cell, caffeine looks like adenosine. Caffeine therefore binds to the adenosine receptor. However, it doesn't slow down the cell's activity like adenosine would. So the cell cannot "see" adenosine anymore because caffeine is taking up all the receptors adenosine binds to. So instead of slowing down because of the adenosine level, the cells speed up. You can see that caffeine also causes the brain's blood vessels to constrict, because it blocks adenosine's ability to open them up. This effect is why some headache medicines like Anacin contain caffeine -- if you have a vascular headache, the caffeine will close down the blood vessels and relieve it.
So now you have increased neuron firing in the brain. The pituitary gland sees all of the activity and thinks some sort of emergency must be occurring, so it releases hormones that tell the adrenal glands to produce adrenaline (epinephrine). Adrenaline is the "fight or flight" hormone, and it has a number of effects on your body:
More Options: