Upon death, you’ll have the option to Resurrect yourself or choose to die. If you think too long in the resurrection/die selection screen, you’ll still die automatically. Resurrection gives you a “second wind”, which allows you to get up your feet in the same spot, with only half of your max HP recovered. From there, you can resume combat or disengage to heal up.
You can have up to two resurrection charges but you can’t use them consecutively. The default resurrection charge can only be replenished at Sculptor's Idols while the other resurrection charge (with the sakura petal icon) can only be replenished slowly through enemy kills. After using resurrection once, the pink circles above your HP bar will be crossed out with black ink. Just let some time pass until the circles are visible again. One charge is automatically restored upon resting in a Sculptor’s Idol while the other charge is recovered by killing enemies.
We have questions and answers related to this topic which may also help you: