1) Over the Counter Heat Creams
Heat creams like Bengay and Biofreeze are often effective at giving temporary pain relief, though the cream itself won't cure the problem. However the application of the cream via firm massage is effective at lengthening soft tissues, which is more likely to give lasting relief.
The menthol or other active ingredients in the cream act to distract the brain from interpreting the pain signals via spinal gating. Usually pain signals are transmitted through the spinal cord to the brain. However with spinal gating a secondary stimulus like the heat cream acts to block or reduce the pain signals as the enter the spinal cord through the anterior (front) horn.
Other examples of spinal gating include shaking your hand after hitting your thumb with a hammer or even swearing.
As well as heat creams, heat patches have become popular and can be applied (stuck on) for hours at a time. These are available over the counter at drug stores.
2) Prescribed Creams
Recently compounded topical medicines have become popular. Such medicines include pain relievers, anti inflammatories and muscle relaxers. If the problem area is superficial like tennis or golfers elbow then the cream could be effective. However if the source of pain is deep then cream is unlikely to be effective as it won't penetrate much beyond the superficial soft tissues. Also because these prescribed creams are expensive and often ineffective health insurance companies are starting to exclude them from patients benefits.