Caffeine as a Stimulant
Caffeine (3,7-dihydro-1,3,7-trimethyl-1H-purine-2,6-dione) is a naturally occurring alkaloid, in; coffee, tea, guarana leaves, maté and cola nuts. It acts as a diuretic and stimulant of the central nervous system, cardiac muscles and respiratory system. However its most utilised property is its ability to delay fatigue.
Alkaloids are a very significant group of, mainly naturally occurring, drugs, including heroin, morphine, codeine, methadone and theophylline. The presence of other alkaloids can make the effects of caffeine more potent, further activate it. This explains why tea can sometime have a greater "kick" or stimulating effect than coffee, since theophylline is present in addition to caffeine. Theophylline primarily relax and smooth muscles rather than acting as a stimulant.
Theobromine is far less potent than caffeine although very similar in structure, and only presence in significant amounts in chocolate. Note that all three have very similar chemical structures, they differ only in the number and positioning of methyl groups.