Rest days and easy workouts build up your mental and physical toughness. It can be difficult to find the proper balance between work and recovery. A start is establishing that there should always be more recovery than work.
Both in training and in racing, I think of three categories of pain that are important to learn how to distinguish. I call them 1) expected pain, 2) manageable pain and 3) injury. These types of pain are your friends because they tell you what’s going on with your body, so you can know what to do. I say “learn” because initially it can be hard to distinguish between them.