Capsaicin pain mechanisms are elaborate and complex. I will try to review them simply here. But first a little bit of (gasp) anatomy needs to be reviewed.
There are two types of sensory neurons, A and C type. Type A afferent sensory neurons (of which there are actually two subtypes, but we don't need to get into that) are typically large and well myelinated, making them transmit signals faster. Type C are smaller in diameter and not as well myelinated and their signals travel slower. Type C fibers can protrude all the way into the epidermis, which has only recently been recognized and accepted by the scientific community. Both types' cell bodies are in the dorsal root ganglion of the spinal cord, so their dendrites go all the way from the spine to everywhere in your body. Perhaps the main difference in functionality of types A and C fibers is in their receptors, type A have pressure sensitive mechanoreceptors, while type C have chemoreceptors, thermoreceptors, and also mechanoreceptors. Type A usually respond to pressure, that is they give you the sensation of feeling light stimuli. Type C give you all the other kinds of touch sensations, hot or cold and pain.
The receptor that most concerns us is a thermo/chemoreceptor present on Type C fibers called Transient Receptor Potential Vanilloid-like 1 (TRPV1). This receptor is a calcium channel and a heat receptor with an activation threshold of approximately 37-45 degrees celcius (37 degrees is the body's resting temperature). Capsaicin is a TRPV1 receptor agonist, which binds to the channel and lowers the activation threshold; thereby making it open at or near room temperature. TRPV1 is most prevalent on the nerve terminals of temperature sensitive dorsal root ganglia (DRG) cells. This is why capsaicin is perceived as being "hot", because it tricks the temperature sensivitive neurons into registering a temperature increase. It can even be perceived as being painful, as type C fibers, in addition to temperature, transmit pain signals. Too hot or too cold is painful.
Now that you know how capsaicin causes pain, proceed from this capsaicin pain page to the capsaicin cream page to learn how it decreases pain.