Pain or soreness is part of the game and a great will power test. Soreness and pain gives you the opportunity to show yourself that your goal is more powerful than small obstacles that may come your way.
Again, if the injury compromises your ability to do basic body movements then you have to understand, be kind to yourself, and have the patience to let yourself heal without letting it diminish your desire to accomplish your fitness goal. I once had a tailbone injury that sidelined me from basic mobility. I couldn't even carry my new born. I took a few days off and focused on healing. Once better, I got right back to it.