If it's something that happens within a day of working out- do some light exercise (do a different exercise- e.g. if your legs hurt, do some walking, arms swimming, back, rowing...) on those muscles the next day, including stretching what's sore, followed by a recovery meal including 1-2 servings of protein (3-6 g) and 8-16 oz water. (A peanut butter sandwich or a serving of no-sugar added yoghurt is as good as anything else available)
Most descriptions of rest periods I'm familiar with range between 24-96 hours, depending on the intensity of the workout and the fitness, lifestyle, and age of the individual. (Listen to the information your body is giving you, and go from there.)
If stretching and a recovery meal isn't already part of your routine after resistance training, incorporate that into your workout. (That will help with soreness in the future, and help your muscles develop properly)
If the onset of pain is delayed more than a day and/or increases in intensity over a couple of days, back off the intensity of of your workouts in the future, and do the light workout routine for a couple of days until the pain has stopped. (You over-did things)
If your joints hurt, that's not normal, nor is it a case of overdoing it. Get help on your form from someone who knows what they're doing and have the joint checked out by your attending physician before resuming. (You can't get medical advice over the web, since health care professionals are ethically bound not to do so.)