Wealthy ancient Egyptians spent a lot of their lifetime getting ready for death. They believed that a person could live forever in the Afterlife, as long as they prepared in exactly the right way.
The body was mummified so that the spirit, or ka, of the dead person could return to it. The body was then placed in a tomb where it would not be disturbed, with models of the actual things that the dead person would need in the Afterlife. Spells to help in the next world were written down and left alongside.