Add this to the above:
If the pain's minor and you can continue to work the area directly without increasing the pain, it might work to continue. I'm doing that right now and the pain's under control, slowly diminishing over time.
IF the pain increases, then you have to avoid direct work and if that doesn't work, even take a complete break from weights. Wait 2-4 weeks and see if it goes away. If it doesn't, then you might have to see a doctor about getting a cortizone shot or something else.
Either way, when the pain's removed you have to do things differently to avoid a repeat - better warmups, using moderate-high reps, resting no longer than a minute between sets to keep the area warm, trying slightly different ROMs/grips to avoid aggrevation, dumbbells instead of barbell, cables/machines/weights as alternatives, or a different exercise, etc.