Recovering Hit Points. Hit points can be restored in a number of ways.  

Rest, both short and long, is the most basic way to recover hit points.

Magic items can help you regain hit points. For example:

Spells can heal hits points:

Cure Wounds 

1st-level evocation 

Healing Word 

1st-level evocation

Prayer of Healing 

2nd-level evocation

Heal 

6th-level evocation  

Mass Cure Wounds

5th-level evocation

Mass Healing Word 

5th-level evocation 

Aid  

2nd-level abjuration

Mass Heal 

9th-level evocation 

Regenerate

7th-level transmutation

Temporary hit points are a buffer against damage. See examples of how to get temporary hit points.

The beacon of hope spell enhances healing.

A few creatures can naturally regenerate hit points.

Healing spells are enhanced for clerics who choose the Life Domain.

Stabilizing a creature with 0 hit.