The purpose of resting is to slow down your heart rate and breathing and rest your hearts and lungs. Resting gives your body the time to get rid of the lactic acids built up in your muscles and to recover from the strains and possible pressure sores.
Try to rest in regular intervals and make them part of your walking rhythm. Try to rest for 10 minutes after every one hour of hiking.
Try to stick to short 10 minutes breaks and only use your lunch break and possibly your dinner break as extended rest periods. 10 minute is the most effective rest duration when it comes to body recovery.
Set a stop watch if you fear that there is a chance of breaking the 10 minute limit. It is very easy to dose of even in 10 minutes.
Make sure to take of your backpack and try to relax your body and mind as quickly as possible. Get out of the sun and generally try to rest in a cool and shady location. You can use your backpack as a back support for sitting down.
In longer lunch and dinner breaks you will want to give your feet a rest by removing your shoes and putting on slippers, sandals or, if conditions allow it, walk bare foot. That will help prevent Blisters. Longer rest periods are also a great opportunity to dry possibly wet clothes and check your equipment.