This change occurs at the level of your brain. When you move your body in a way that is painful, then you create connections that ALL movement is painful. You become completely unmotivated to move and will avoid it at all costs. This is just your brains way of trying to protect you from danger. Pain in the body is regarded as a bad experience and your brain will do what it takes to avoid it.
This process also works in reverse. If you dislike exercise then simply thinking about doing it can put you into a negative and "painful" state of mind. Many people go through their day dreading the exercise that they have planned in the evening, and then when they eventually come to doing it they are just reinforcing that neural connection. The message sent to their brains is basically - "I hate to move, please help me stop".
And that's exactly what your brain will do. It will make you hate exercise and worse of all, it will make you hate moving your body in any way. You are then left in a situation where you feel guilty, lazy, and miserable, because you can't find the motivation to move yourself from the sitting-room chair.