Tombstones have the same properties as ghosts, but cannot move at all. A tombstone can respawn as a ghost in the nearest cemetery. As a ghost, you can seek out a Phoenix Statue.
Note: Before version 1.13 characters would become ghosts directly where they died, not in a cemetery.
As a ghost, your actions are severely limited. You cannot talk to NPCs, perform exchanges, initiate combat (or be aggroed by monsters), perform professions, use items, zaaps, etc. Things ghosts can do include talking, dropping items.
Returning a ghost to his original form is done by touching a Phoenix Statue, which will resurrect the character and raise their energy to 1000. These statues are marked with red flags on the world map when becoming a ghost.