No pain, no gain.
Pain means that the body is signalling that there is something wrong. If you feel pain when exercising, either slow down or stop the workout. To gain from exercise, you may have to make do with a bit of discomfort, but pain is different. If you continue exercising with pain you may damage a muscle or tendon permanently.