Our life on Earth ends, of course, with death. Sooner or later each of us must let our tabernacle of clay return to the dust. But death is not the end of our existence, just the end of mortality. Our spirits, everything except our physical bodies, will live on in a place of waiting called the Spirit World.
In the Spirit World, the dead await the resurrection, which is possible through Jesus Christ. There are two divisions in the Spirit World: Paradise and Outer Darkness, also called Spirit Prison or Hell. When we die, we will be judged according to what we did with the light and knowledge which we received on the Earth. If we were righteous, we will go to Paradise (Alma 40:11–12). If we were not, we will go to Spirit Prison (1 Peter 3:19). These assignments are temporary and last only until our bodies and spirits reunite in the resurrection. Further, these divisions have more to do with our relationship with God than they do with geographical locations. Everyone who lived a righteous life, even if they did not receive the fullness of the Gospel, are entitled to some portion of God’s Spirit. Those who lived a wicked life are not and will be cut off from His presence. The separation from God’s presence, as we’ll discuss at length later, is truly Hell.
What few recognize, though, is that the Spirit World is really an extension of mortality. Those there have the opportunity to be taught, to exercise faith in the Lord Jesus Christ, to repent, to be baptized, to receive the remission of their sins, to receive the gift of the Holy Ghost, and to receive Temple Ordinances and Covenants. But even though they can learn of Jesus Christ, exercise faith in Him, and repent in the Spirit World, they cannot receive the Ordinances and Covenants of the Gospel without help.
The Ordinances and Covenants of the Gospel pertain solely to mortality. We cannot receive them unless we have physical bodies. For example, we can’t be baptized without being immersed in water. And that creates a problem for the billions of people who lived on Earth who never had the opportunity to receive the fullness of the Gospel. But God is just and will not punish someone simply because she was born in a place where the fullness of the Gospel was not available. So God allows members of The Church of Jesus Christ of Latter-day Saints to receive the Covenants and Ordinances of the Gospel for them vicariously in Holy Temples. Members research names of the dead and submit them to Temples. Then they receive the Covenants and Ordinances of the Gospel in their place. The dead then have the choice of whether or not to accept the work that has been done for them.
Lest you wonder how the dead can receive Covenants and Ordinances vicariously, remember that Jesus Christ suffered for our sins vicariously. So if Jesus Christ can suffer in our place, there is no reason to doubt that we can receive Covenants and Ordinances in the place of those who have died.
After everyone in the Spirit World has the opportunity to accept or reject the fullness of the Gospel, everyone will be resurrected. That is, our spirits and our physical bodies will be united, never again to be separated.