We are training to produce adaptations, and through those adaptations we become more capable. There are a lot of different adaptations that happen as a result of training; for example, in aerobic training the heart's stroke volume increases and Haemoglobin levels in blood rise. In muscular training, muscle fibers get stronger. In the case of muscles, working them hard breaks down muscles - that is why we get sore - and we need rest so that there is time for them to rebuild.
For aerobic training it's more complex. The response of our bodies - how much we improve - is related to how hard we work out (often known as "training stress"). But how hard we work out depends upon how well-rested we are.
If we run every day, we will become good at running every day - our bodies will adapt quite well - but we will never be fully rested, so we will be limited on the amount of stress we put on our bodies. On the other hand, if we run every other day, we will be more rested and therefore be able to put more training stress on our system, leading to more improvement during our next rest day. Another way to look at it is that your body adapts to the peak effort that you using during training, not the total amount of effort.
This is the whole principle behind High-Intensity training, or interval training. It works very well, but only if you have enough time between interval sessions so that you can recover enough. If you don't recover enough, you won't be able to increase your peak effort in future workouts.
If you want more information on specific adaptations, a search of "physiological adaptations to exercise" should find you good info. A search on "science of interval training" (or hit training) should find good info there.
The key to recovery days is that you aren't putting additional training stress on your system, as that will compromise your recovery. In general, active recovery - working out lightly - is superior to pure rest, as long as you work out very lightly.