A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps or performs light activity (reading, talking, eating, or standing watch) for no more than 2 hours.
At the end of a long rest, a character regains all lost hit points. The character also regains spent Hit Dice, up to a number of dice equal to half of the character's total number of them (minimum of 1 die).
A character can't benefit from more than one long rest in a 24-hour period, and a long rest is interrupted if the character performs more than 1 hour of strenuous activity, such as fighting, casting spells, or similar adventuring activities.