A rest day is a way of allowing the body to recover from training sessions, facilitating the adaptations that we wish to occur from the sessions we have engaged in. For example, when following a strength training program it isn’t in the gym that we get stronger, this is just the stimulus which creates the adaptation, it is in the recovery time afterwards where the body repairs and adjusts its structure to be better able to complete the task.
Let me know if you have any questions!