yeah it kinda depends. if a small muscle group is sore, I just don't do anything to isolate it (like sore biceps or forearms, I won't do any curls that day, just compound back exercises)
but if a major muscle group like chest or quads is sore, skip it.
and when I say sore, I mean tight/stiff, with minor aches. If a muscle actually is tender or really tight, skip it. that's a still very damaged muscle that needs at least another 24-48 hours to recover.
if your muscles are so sore you consider taking ibuprofen or soemthing, you over did it. fairly easy when starting out, which is why newbies shoudl only do 1 set the first week or two, then add a set for a week or two...etc, until you''re at your programs desired set range.