Dying
Normal Minecraft death rules do not apply. What happens to your belongings depends on where you die.
Graves
Without protection your belongings drop where you died. If you die in the City without a gem, your belongings are laid to rest in a grave in the Grave Yard: a chest under a headstone that now carries the date, "RIP" and your name. Most valuable things go in first; what does not fit is dropped beside the grave if it is worth keeping, and lost otherwise.
Nobody else can open a grave until it is three days old, and old graves are reused first, so recover your things in time. Items with the curse of vanishing never survive a death.
Gems of Life
A Gem of Life in your inventory keeps everything you carry, including your experience, when you die: you get it all back when you respawn and one gem is used up. A learned Tome of Life keeps your belongings without spending gems.
Bosses, arenas and mini-games
Some places protect you on their own and never spend a gem: the Sand Arena, the Mirage Arena, the boss fights and the mini-games, which hand out their own gear.
Getting back
Phantom Potions carry you to your most recent grave. For 30 seconds mobs leave you alone and the Grave Yard's fog cannot blind you, until you hurt something. Without a known grave the potion is not drunk. New players get a Newbie Phantom Potion (see Getting started); it expires after the time shown on it.
The Potion of Restitution carries you to where you last died (with 10 seconds of poison); without a known death point it is not drunk. Your belongings are in a grave, not where you died, so use a Phantom Potion to get them back.
You respawn at your home when it is safe, otherwise at the dimension's spawn.