I saw on Fox News a month ago that they found the exact part of the brain that causes pain and they a person and physically/mentally will the pain away, causing activity in that part of the brain to decrease.
It's all in mind. A matter of will. It would be great if we could control it, but medicine today just tricks it.