Todd Hargrove is able to describe in simple enough terms, how movement can decrease pain through adaptations in your brain and nerves:
We experience pain in relation to movement when the nervous system perceives that the movement is threatening to the body. Like other perceptions, the perception of threat is an interpretation that is subject to change based on a wide variety of information. A program for graded exposure can offer the nervous system new information about a movement that might cause a change in perception. If you can find a way to perform a currently painful movement at a low enough intensity that it does not hurt, you are sending the nervous system feedback that the movement is safe. If you do this repeatedly, perhaps the nervous system will start to disassociate the movement from the pain. This is the same rationale underlying many treatments for anxiety and phobias.