In order to gain hit points through rest, the character must spend a 24-hour period doing no strenuous work or exercise. This must be in a safe, comfortable place, where the character has no reason for concern and is warm.
The character's pulse rate may not increase, and while the character need not be bedridden, the character cannot walk a distance of more than 400 feet throughout the day. While healing spells can be cast, the character cannot cast any other spell (including passive spells such as identify, mending and the like), nor memorize any spell, as these efforts are considered to be strenuous. Battle in particular will spoil a day of rest, as it produces more than physical strain, but mental strain and stress as well.
Meditation and contemplation are not considered to be effort, and will have no detrimental effects on rest.
Hit points gained from rest are based upon the character's physical being. As it is supposed that training increases the number of hit points a character has per pound of mass, the healing of that mass means that a character gains back 1 hp per day of rest per level. Thus, a resting 5th level character will gain 5 hp per day.
Some characters will have the ability to marginally improve this rate of healing through rest still further, through the application of herbs and medicine.