The studies above are encouraging, but so much is still unknown about both pain and meditation and how the two function in the brain. What scientists are beginning to understand is how this all seems to work. Meditation (and other similarly effective visualization and relaxation methods) alter areas of the brain associated with pain, as this 2014 article in The Atlantic by Brian Steiner explains:
"By decreasing activity in the primary somatosensory cortex, the pain processing area, and increasing activity in the three other regions, pain is reduced."
Those three other regions, as Steiner explains, are the anterior insula, anterior cingulate cortex, and prefrontal cortex. In the simplest terms possible, the anterior insula appraises the level of pain in the body, the anterior cingulate cortex regulates an emotional response, and the prefrontal cortex presents thoughts and, ultimately, how we act in response to the pain.
The primary somatosensory cortex processes the pain. It's the first line of "defense" if we touch something hot. Meditation has been shown to decrease activity in this area, so the amount of pain we initially feel is reduced. But meditation does most of its work in those other areas, those perception areas. We can feel an amount of pain and, through one of several meditation practices, acknowledge it differently. Our emotional response to pain subsides and we aren't focusing as much on it. It becomes one of many stimuli passing through our body at any time, not the defining element.
Meditation also, somewhat counterintuitively, gives patients with chronic pain a chance to exert some control where they may have previously felt helpless. By accepting the pain as a reality, we're taking away some of its power over us. We have to give up control to get control.
However, another factor that's impossible to avoid is that all our bodies are different. We all react to pain in different ways. Those with chronic pain conditions have different experiences in terms of frequency, intensity, and triggers. Meditation will likely never be prescribed as a "cure" for anything, nor should we hold this expectation. That being said, there's a consistent body of research that's built up over the last two decades. Those who've found dead-ends with prescription drugs and other therapies may have a reason for hope with a consistent mindfulness practice.