I'm sure you have heard, "it hurts so good" when it comes to your body.
While releasing a muscle can "hurt so good", when working out one wants to be more conscious of how the body feels. When you are working out, you are loading the joints and muscles and want to be sure you are not overloading them and injuring them.
That being said, often, when you first start doing an activity you might get a pinch or uncomfortable feeling in the muscle or joint as the muscle gets use to the motion or the joint repositions. If you feel a pain when you perform a movement, pause, then try to repeat the motion but with less range of motion. If the feeling isn't there, then you know that it was just the muscle or joint getting adjusted. If it persists, then you might want to see a doctor of physical therapy to examine what's going on.