Your symptoms suggest improper gymming technique.
Try performing warm up before exercises.
And limbering down following exercises.
Take a bath after exercise with hot water to relax muscles.
Next Steps
gradual build up on weights or exercise intensity.
visit orthopedist for acute back pain.
Health Tips
supervised gymming with an trained instructor should help.