Watch the video Gate-Control Theory of Pain
People have observed that touch, vibration, rapid movement (like shaking your hand after it is hurt), electrical stimulation (like a TENS unit) and even moisture and texture changes (like putting an injured finger in the mouth) seem to decrease the intensity of pain. There is a theory of how this might be happening at the level of the spinal cord. This theory is called the gate-control theory of pain and is illustrated below. It is important to understand that A-alpha and A-beta fibers are part of the DCML pathway for discriminative touch and that the C fibers and A-delta fibers are nociceptors that are part of the ALS pathway.
Image by JS F17
The flow of nociceptive signals through the A-delta and C-fibers can be interrupted by simultaneous activation of A-alpha or A-beta fibers. For example, if you hit your thumb with a hammer you can decrease the pain by vigorously rubbing or shaking your thumb for a while. This will activate the discriminative touch receptors (including the ones that sense vibration and proprioception) and transmit via DCML primary order neurons. These primary neurons (A-alpha and A-beta) also stimulate inhibitory interneurons within the spinal cord which, in a reflex-like manner inhibit ALS second order neurons. Consequently, decreased frequency of pain signals reach the brain.