They say that if you have mild muscle soreness after working out then that is quite normal. They even say that most people with arthritis can exercise through mild discomfort.
However if you have moderate to severe pain in a particular joint before exercising then its best to avoid that joint in your workout.
If you have moderate to severe pain during the exercise then you should stop exercising and consult your GP as this could actually be a sign that your joints maybe damaged or inflamed.
Joint pain after exercise isn’t right so if you do get that then change to an exercise that puts less stress on your joints.
Finally if you have moderate to severe joint pain the day after exercise then rest for the day and do a shorter or less vigorous workout next time.