Caffeine works on the central nervous system, where it helps to increasing alertness, focus and concentration. It has also been shown to stimulate the release of adrenaline in the body - this mobilises the release of fatty acids from fat cells which may result in more fat being used for energy during sport, thereby sparing the valuable glycogen stores. The effects may not last long and are inconsistent, (varying from athlete to athlete). Caffeine may also increase the release of calcium in muscle cells, increasing the strength of muscle contractions.
But how much do you need as athlete?
A low-to-moderate dose of 3-6mg / kg body weight has been found to be effective, with studies showing that there is little to no benefit in higher doses. Coffee, energy drinks and gels are most common sources. It is important to experiment in training to determine individual supplement timing for optimal performance, at the lowest effective caffeine dose.
Most athletes take their dose 15 – 60 minutes before to a race or training session. Beneficial effects are experienced for 1-3 hours in regular caffeine users (300mg/day) and 6 hours in non-users (<50mg/day).
It's important to note that there is very little sound evidence supporting a 24 – 48 hour caffeine withdrawal period prior to an event to enhance the beneficial effects of caffeine supplementation.
Learn more about (roughly) how much caffeine is found in various sources, here.