Caffeine works by stimulating the central nervous system (CNS), as well as the liberator of fat from fat cells - through something called cyclic AMP (cAMP).
The greatest effect on slim men
Studies on caffeine shows that caffeine increases the metabolism of fat in slim people. In men, it also appears that caffeine can affect metabolism directly, by increasing the level of T3 (the most active thyroid hormone).
It does however appear that coffee also may contain other components that has a positive effect on fat metabolism. In a study found a correlation between intake of coffee without caffeine and weight loss.

References:
1. Bracco D et al. Effects of Caffeine Wed energy metabolism, heart rate, and methylxanthines metabolism in lean and obese women. Am J Physiol 1995
2. Spindel ER et al. Neuroendrocrine Effects of Caffeine in normal subjects. Clin Pharmacol There 1984
3. GreenbergJA, AxenKV, Schnoll R, BoozerCN. Coffee, diabetes and tea: the function of Caffeine and weight loss. IntJ ObeseRelate Metab Disorder2005
4. Alan Aragon. Girth Control (2007)