Minecraft wiki entry for Health, associated text: The Instant Health effect restores health immediately, the amount depending on the source and effect level.
On Peaceful difficulty, the health meter continuously refills over time.
On other difficulties, health regenerates slowly when the player's hunger is at or above 18 ( × 9).
The Regeneration effect makes health regenerate fairly quickly, and the hearts of the health meter bounce in a wave. Aside from potions of Regeneration, this is also provided by beacons and golden apples. The "basic" golden apple provides it (level II) for 5 seconds, restoring a total of 4. The "enchanted" golden apple provides Regeneration II for 20 seconds, regenerating about 16 × 8‌[JE only]/Regeneration V for 30 seconds, regenerating about 200 × 100.‌[BE only]
The Health Boost effect adds 4 () per effect level to the player's total health that can be healed or regenerated by normal means, which is removed when the effect expires. After the effect expires, the player's health may remain above the normal maximum, but the extra health is not recovered once lost to damage. This effect can be gained only through commands or mods. At the levels of 252-256 (with amplifiers 251 to 255), the player has 512 hearts (1024 health points, the "red health" limit for entities).
The Absorption effect likewise adds 4 for each effect level. Different from the Health Boost effect, this special health cannot be healed or regenerated by normal means. Naturally, it is removed when the effect expires. The "basic" golden apple provides it (level I) for 2 minutes, providing a total of 4. The "enchanted" golden apple provides it at higher level (level IV), providing a total of 16 × 8.