the short answer
Rest between sets is the recovery you take between working sets, and it should match your goal. Rest 2 to 5 minutes for strength and power, roughly 1 to 3 minutes for hypertrophy (muscle size), and under a minute for muscular endurance. Longer rest generally protects performance, so even muscle-growth training often does best toward the upper end.
These ranges are general training guidance, not medical advice. The right rest for you depends on the exercise, load, your recovery, and how the set is meant to feel - use the numbers as a starting point and adjust.