Sometimes, we hear a story from a patient that goes something like this: "I was doing an exercise at the gym and I felt a sharp pain, but I kept going"
Pain is your body's way of telling you something is wrong. Other than the usual muscle burn you feel while working out and mild soreness after, you should not be experiencing sharp pains during your workouts. If you are, you should stop and try to figure out what's wrong.
Sometimes people mistake stopping an activity because of pain with giving up or being lazy. But if you are exercising to be healthy then dealing with injuries and taking the time off to let them recover is the best kind of healthy you can be.
If your pain is mild and comes after a period of being very active then you could simply be overdoing it and need to incorporate more rest. You should also take a closer look at your overall exercise routine and see if you are falling victim to pattern overload. But if your pain is sharp and persists even after time off, then you should seek the advice of a professional. Don't risk having a small injury that's treatable turn into something permanent that's going to inhibit you for the rest of your life.