Death - Not the End of the Road
One of the monumental moments of any adventure is the death of a beloved or hated character. Most DM's immediately have their player roll up a new character and introduce them into the party. This is fine if the player wants a new character to play and/or everyone at the table hated the character.
However the roll of the die can kill a character that we desperately love because of bad luck. While the character's death should not be taken lightly, in a world where ghosts, undead, and planes of existence where the dead roam should mean that the character survives in a sense even after death. You should allow the continuation of the character's story after their death.
The Afterlife
In order for the continuation of characters you must outline what your world's afterlife is like. If you use an established realm make sure to read up on how the dead travel to the afterlife. The best inspiration for what your afterlife is like is from Earth religions, past and present. Covering each of the different religions is an entire topic in itself. I will be unable to cover them here, but I can cover some basic ideas.
Heaven/Hell
Probably the one most commonly known is the concept of a Heaven and a Hell. After one dies they are judged and then sent to either Heaven or Hell. This can be expanded to include several Heavens and several Hells. Heaven is often for those with pure spirits or those who die a glorious and heroic death. Hell is for those who commit sins or acts of evil.
Limbo/Purgatory
It is important to also have a place in your afterlife that the innocent or uneventful and average lives. This could also be a place where those who wasted their lives go. It can also be the place for those who have not undergone the appropriate rites of given religions. This can also be several different places depending on your personal preference.
Guide to the Dead
When a spirit enters the realms of the dead it is important for someone to guide them to their judgement. In Greek Mythology this is Hermes and he takes them to the ferry at the River Styx. Without a guide it is possible for the dead to wander and not find their way. If your world does have a guide it could lead to an interesting quest for them to disappear.
Adventures After Death
After players pass into the realm of the dead they start to go through the process of passing into the afterlife. Since characters tend to create ripples through their actions and divine interactions this process could be interrupted. Here are some examples of adventures started by dying:
The deity asks you to destroy an invader in their realm.
You are sent into a nearly infinite maze by a deity to prove you are a champion.
A party member(s) is imprisoned by a demon and it's your job to get them free.
Coming Back
In a world with resurrection magic the dead can be brought back to life. However, doing so is not without cost. Your party may have to go on an adventure just to retrieve the needed components or someone who can cast resurrection magic. At the same time you should consider how such magics affect the average life and what gods of death think about this kind of magic.
Coming back from the dead could have a significant impact on the world depending on the information that one keeps after resurrection. If one comes back with full knowledge and their stories are to be believed it could change the views of the afterlife.
Sometimes coming back does not return you to same body you died in. Perhaps you were raised as an undead creature. There are several homebrew options you can find online and one we will be covering in the Homebrew Cauldron Podcast (it will be episode 2).
Returning as an NPC
Sometimes a character will be killed by the party they have traveled with, either because of a decision they made or becoming evil and turning on the party. When they have passed it is entirely up to you to claim that character as an NPC should the player choose not to continue their story. Here are a few reasons a PC can be made an NPC after death:
The PC returns as a Revenant to hunt down the party
The Big Bad resurrects them to join his cause by sending him after the party
The PC's ghost lingers and grants information to the party, or in another campaign.
The death of a PC should never be taken lightly. With the magic of resurrection death is never the end of one's story. When attached to a character a DM should take into consideration allowing a player to continue with them until it no longer makes sense within the narrative.