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.
Timing your resurrection will matter
When you die, you don't have to resurrect immediately. For non-boss enemies, they'll normally lose interest and turn their backs. If you wait for them long enough to walk away, they won't notice when you resurrect, giving you to instantly get revenge by performing a deathblow. You can still move your camera angle and target an enemy while you're in the Death screen. This trick won't work against certain, tougher enemies and bosses since they'll either walk around you or they'll notice your resurrection animation much easier.