Source

For the pain study, research subjects received light pain stimuli in the form of mild electrical shocks to one of their forearms. The meditation group experienced the pain in both an everyday state of mind and in a state of meditation. They turned out to experience the pain not as less strong, but as less unpleasant. In their brains, the reduced pain perception went hand in hand with increased activation in the posterior insula (the area involved in the sensation of pain) and decreased activity in the lateral prefrontal cortex (the area that regulates experiences). This pattern is the opposite of what happens in the brains of non-meditators. In other words, meditators were able to reduce their pain in a unique way by tolerating the pain sensations instead of exerting mental control over them.

More at source.