A brief look at the Wikipedia page on caffeine doesn't indicate any analgesic effect of caffeine itself. So, what mechanism/pathway allows it to attain this adjuvant effect for pain relief?
Zhang (2001) reports that the analgesic activity of caffeine is due to
- a blockade of peripheral pro-nociceptive actions of adenosine;
- the activation of the central noradenosine, pain-suppressing pathways;
- stimulation of the central nervous system with subsequent actions on pain perception;
- inhibition of PG (prostaglandine) E2 synthesis, just like the primary mechanism of paracetamol and caffeine by blocking the COX enzyme;
- disinhibition of inhibitory adenosine actions on central cholinergic nerve terminals, leading to increased acetylcholine release and activation of cholinergic mechanisms involved in analgesia;
- lastly, caffeine-induced changes in mood may help in in pain relief.
Concerning the direct COX inhibitory action (which highly surprised me, personally) - Aspirin-like drugs act on the catalytic site of the COX enzyme. Paracetamol is believed to act at a different site, such as the peroxidation site of COX, while caffeine may block synthesis of the COX-2 protein, probably at the transcriptional level,thereby leading to enhanced COX-2 inhibition. Caffeine is a nonselective antagonist of adenosine A1 and A2 receptors. Adenosine A2a receptors induce intracellular signalling events that cause an upregulation of the COX-2 gene and the release of PGE2 in rat microglia, which is antagonized by caffeine.
Tavares & Sakata (2012) also provide an interesting review on the analgesic effects of caffeine, without it being used in conjunction with other medications.