This page of the Ratchet & Clank Rift Apart game guide explains how to recover lost health points. You will learn the ways to heal in the game, what can happen when your character dies, and how to permanently extend the health bar.
Healing your character
Your character's health bar is displayed in the upper left corner of the screen, but only during battles. Unfortunately, you don't recover health automatically in the game, so you'll have to take the matter into your own hands. If your character is low on health points, try to dodge more often and avoid direct encounters. Pulling yourself to nearby crevices is a great way to escape enemies quickly.
In order to heal your character, you must find health crates like the one in the picture. Do not destroy these crates if you're only missing a few health points, as you will "waste" their full healing potential. Just make sure to memorize their location in order to quickly find them again.
Once you lose all your health points, it's over. The game will restart at the last checkpoint. Fortunately, these are created regularly so you won't lose too much progress. Additionally, character death doesn't incur any penalties to stats or obtained bolts.
Keep in mind that you can change the difficulty level in the game options at any time. This is a good idea if, for example, you are completely unable to defeat a boss.
Extending the health bar
As you progress through the campaign, you will be able to permanently increase your health bar, allowing your main character to withstand more attacks (or stronger attacks) before dying on the battlefield.
You can extend your health bar by leveling up your character. This means that you should earn as much XP as possible by completing quests and additional activities. Each level adds 10 points to your health bar, so the difference is quite significant.