This is one of the most important questions you can ask, and we are glad you are asking it before training through something that could get worse. The short answer is: it depends on the type of pain.
Sharp pain is a hard stop. If an exercise produces a sharp, stabbing, or shooting sensation, stop immediately. That is your body signaling that something is being damaged, not just challenged. Training through sharp pain almost always makes the injury worse and extends your recovery time significantly.
Dull muscle soreness is different. If you are feeling general fatigue or that familiar ache a day or two after a session, that is normal adaptation and not a reason to skip training. The key is learning to distinguish between the two.
Shoulder pain, wrist pain, and elbow pain are the three we hear about most often in the community. All three have common workarounds. Wrist pain during push exercises, for example, often responds well to using fists or parallettes to keep the wrist in a neutral position. Shoulder issues frequently come down to scapular positioning and can often be trained around with adjustments to range of motion and load.
The most important step you can take is to post in the community with as much detail as possible: where the pain is, when it started, which exercises trigger it, and how it feels. Daniel or Malin will respond with specific modifications for your situation. Do not guess on this one.