That way is by vicarious temple ordinances.
We are baptized for our dead. We are confirmed members of the Church for our dead. We are ordained to the priesthood for our dead. We receive the temple endowment for our dead. And we are sealed as husbands and wives, parents and children - for our dead.
The work begins by learning who our dead are. That means performing genealogical research - to learn about our ancestors.
President James E. Faust said:
“The great work of providing the saving ordinances for our kindred dead is a vital part of the threefold mission of the Church. We do this work for a purpose, which is to redeem our dead ancestors. Temple work is essential for both us and our kindred dead who are waiting for these saving ordinances to be done for them. It is essential because “we without them cannot be made perfect; neither can they without us be made perfect.” They need the saving ordinances, and we need to be sealed to them. For this reason it is important that we trace our family lines so that no one is left out.”This is why the LDS Church has the world's most comprehensive genealogical database and the most extensive search tools available. We are not only interested in our ancestors (and it is very interesting), but we feel a sacred duty to them.
Here's a great summary of temple work. Here's another very informative article. (Explore these for yourself - the knowledge you'll obtain is very valuable.)
The beautiful thing is that the work performed for the dead is done with the hope and faith that the recipients of the ordinances will accept them. That is, temple ordinance are forced on nobody. We simply perform the ordinance just in case the deceased person for whom we are doing the work decides to join the Church. How does that work, you ask?
The Gospel of Jesus Christ is being preached to the dead right now. No, there aren't a bunch of missionaries standing in cemeteries teaching lessons to the graves. That work is going on in the spirit world. Faithful members of the Church who pass away are put to work on the other side of the veil, bringing light and truth to those who did not have a chance to hear the Gospel in this life.
If they choose to accept the message, and they want to be baptized, how can they do that when they don't have a body? That's where we come in. By performing vicarious baptisms, we are doing for those people what they can't do for themselves. That is truly an example of service.
I have had the most wonderful spiritual experiences doing the temple work for my own family members who have passed on. So far I have not done very many family members (I have a long way to go, since I am the only one in my family doing the work) - but what I have done has been magnificent. I have done all the work for my grandparents on both sides, and great grandparents on my mother's side, as well as my Dad's cousin. These were such great people, and I feel very strongly that they have accepted the work.
It was a sacred and unforgettable experience. When we finished with the sealings (temple marriage - the final ordinance) for my grandparents, I felt very connected to them - almost felt their presence. I remember reaching out to them with my thoughts and saying, "Okay, now we've got mom and dad sandwiched. I'll work on them from here, you work on them from there."
Curiously, my mom told me a few days later that she'd had a dream the very night we had done the sealings (though she had not known about the sealings until I'd called her a few days later). She said that in the dream she saw her father, and he was beckoning to her. Then he disappeared and she couldn't find him. Then I appeared and took her by the hand, and told her I would lead her, and take her to her father. My mom is known for having powerful dreams, and I think that dream was profound, the timing more than a coincidence.
The sweet thing is, although my parents are not members of the Church, they said that they appreciated us doing the temple work, and Dad said that "wherever they are, I'm sure they appreciate it."
I have a solid testimony of the temple. I know that is is vital that we join our families together, sealed forever, generation to generation, and that the sacred ordinances that bind us can only be performed in the holy temple by God's authorized servants.
It is a great and marvelous work that is to be done - and that work is going on five days a week throughout the world in the 125+ temples of the Church of Jesus Christ of Latter-day Saints (they're closed Sundays and Mondays).
Hundreds of thousands of Latter-day Saints voluntarily give up their time to do this work, from before dawn until long after dusk.
Yes, our Father truly loves his children. He gives them another chance. Death is not too late.
Saving the dead.
It is indeed a labor of love.