For me it depends on the "hurt". Sometimes, very rarely, a muscle is so sore that it is hard to walk down stairs, etc. But the vast majority of the time, I might have some soreness or stiffness, but it's gone the next day, or is no impediment once I start to exercise. I agree with the earlier reply, try a little warm up first and see how it goes. But then if it's painful enough that you are thinking of nothing else, do another workout and let them rest.
Having said this, I ran in a 5K about 2 weeks ago with the most sore calf muscles I've had in ages. Could barely walk to the start. Ran the whole thing (in 90 degree heat, too. I really am nuts). Felt great. Finished. Hobbled out of the finishing chute. I guess it was mind over matter. Was it a good idea? I did pay close attention and if they had shown any signs of cramping, pain, at all, I was prepared to walk all the rest of the way (or lie down on the side of the road and wait for my husband to finish and then come get me...), and I did some more warming up than I usually would have. I also made sure they were just sore, not injured (helped by the idea it was both legs, and I could pretty much identify an exercise I had done the day before in a class that did them in...)
And my fitness club has a hot tub. If I have soreness I soak myself in the warmth and that is a real help.
Wow, I'm chatty. Hope this helps.