The Afterlife is explained very thoroughly at The Check-In Station. Please refer there for an in-depth explanation on how The Afterlife works. This page will only touch on the basics and on how to get back to life.
If you lose a fight while in Wounded Status Mode or are the victim of anything that is classed as being able to cause instant death you will die and be sent to The Afterlife. Everyone who goes to The Afterlife via dieing will start at The Check-In Station. From there you may choose where you would like to go and what you would like to do. The Afterlife is where your character's aligment will heavily determine your actions.
There are currently only three ways for your character to come back to life.
Have someone gather a set of Dragonballs and use a wish (just one!) to bring you back to life. However! One wish brings you back to life... How will you actually LEAVE The Afterlife? Without a teleportation technique, that will require a second wish. Being alive while in The Afterlife is the second worst position to be in in this game (you can not do ANYTHING if you are alive while in The Afterlife except attack another player).
Complete King Yemma's Golden Fruit Special Quest. This is straight-forward. While you are dead you can go on a quest to obtain one of King Yemma's Golden Fruits. They bring you back to life the instant you eat one AND, as a bribe so you don't tell King Yemma, Mez and Goz will see you transported to a location of your choice in the mortal universe!
Re-incarnation! You can be reincarnated at 90% of your PL, with 90% of your known attacks, at a location of your choice. Re-incarnation is a good way to change characters if you decide you no longer want to play as the character you are now.
A word of caution to you; the worst thing that can happen to you in this game is having your character deleted. As of now, this can only happen two ways; if you are caught cheating, or if you are dead, teleport to the mortal universe, and lose a battle. Losing a battle while dead and in the mortal universe will send your character to Maikai. If you are unable to leave Maikai within 30 days, your character will be deleted and you will have to START ALL OVER FROM SCRATCH (or wherever we happen to be starting new members at that time)! So use caution while cavorting about with a halo!