So RAW. an accronym that stands for Rules As Written (via the PHB, DMG, or other published official content).
To regain health you can either use a class feat (i.e: Second Wind, celestial healing, etc..) ,
during a short rest by expending Hit Dice (the dice you "use" when you level up. (we should all have 1 cause were level 1),
via divine spell such as cure wounds or the likes.
Or through a Long rest.
A long rest constutes an 8 hour period where you do no major physical activities (i.e: combat/crafting). for 99% of the races its an 8 hour rest. if your en elf its a 4 hour rest. (per their race feats)
During this long rest you can regain up to 1/2 (half) of the Hit Die you used (during a short rest). (minimum 1).
Now all that said anything is subject to change via the DM. EVERYTHING in the books are mear guidelines that we use to play the game some stick to and adhear to them strictly other play fast and loose with the rules.