When an inactive sim dies, one of two things happens :
1) If the sim has been marked as "Protected", then an urnstone is created for the sim, and that object is added to a mausoleum in town
2) If the sim is not "Protected", the game deletes them to conserve space
Sims are marked as "Protected" when you actively play them. The same flag is used by EA Story Progression to govern whether the sim can be emigrated or kiled by the system.
----
If a playable ghost "returns" to the netherworld, the urnstone is removed from their inventory and placed on the ground where they perished.
However, if the object could not be placed on the ground, it is immediately removed from the game and destroyed.