You have 3 days I think before your sim automatically goes to the underworld and the cease to exist. You basically have that allotted time to do what you can to bring them back to life by either making ambrosia, or using the divine intervention power. They will come back to life by either of those methods. It's neat to use once but it gets old after. You can also harvest a death flower from one of the cemetaries, can't remember which, and when your sim dies the ghost will give it to the grim reaper and the grim reaper will spare your life.