A long rest is a period of extended downtime, at least 8 hours long, during which a creature sleeps or performs light activity: reading, talking, eating, or standing watch for no more than 2 hours. If the rest is interrupted by a period of strenuous activity—at least 1 hour of walking, fighting, casting spells, or similar adventuring activity—the creatures must begin the rest again to gain any benefit from it.
Some abilities (such as Elder Sorcery Creation) have "long rest" as their execution time. A creature may choose to do one of these during their long rest.
At the end of a long rest, a creature regains all lost HP. The creature also regains spent hit dice, up to a number of dice equal to half of the character's total number of them (minimum of one die). For example, if a creature has eight hit dice, he or she can regain four spent hit dice upon finishing a long rest. If a creature has hit dice of different amounts, they can choose which to regain.