The ancient Egyptians believed that after death, one can become immortal in the afterlife if they followed a very elaborate set of funerary practices and rites. The Egyptians believed heavily in life after death, and had very particular ways that the dead should be handled, magic spells that should be cast over the dead, and even specific items that the dead should be buried with that will help to ensure their immortality. It is believed that the reason for the incredibly elaborate preparation for the dead is because the ancient Egyptians believed in many gods, and that each god would judge the individual separately, so it was essential to be as prepared as possible for each god you may encounter as you venture in the realm of the dead.
In early Egypt, the body of the deceased would originally only be buried in simple oval graves with very few items, but as times progressed, the funerary practices of the dead became more elaborate, and the body would be buried in a wicker basket and later, a wooden coffin. Soon after, the Egyptians began the practice that they are very well known for: burying the body in a sarcophagus, which is a stone coffin that is often engraved with artwork or inscriptions associated with the ancient Egyptian culture. In addition to the dead body, these sarcophaguses would often contain items that belonged to the person buried within, such as jewelry, games, and food. These types of practices lead scientists to believe that these people believed that there was an afterlife, although archaeological evidence suggested that your normal, every day person has a low chance of actually getting there.
Osiris is the Egyptian god of the afterlife and the dead. He is the god responsible for judging the soul of the deceased in the afterlife, and the cult of Osiris that followed him were fascinated and obsessed with the afterlife and immortality. The ancient Egyptians believed that death was a transition and that the ka, or the life-force of the person, left the body when one died. This transition into the afterlife also influenced the heavy preservation of the body of the dead, as they believed it was important for the body to be preserved to help a smooth transition into the realm of the dead. They believed that when a person died, they faced a judgement of 42 judges, who would deem the person either innocent or guilty; the innocent souls would transition into the kingdom of Osiris, and the guilty would be thrown to a soul eating demon who would promptly end the afterlife for the soul (but not before being severely punished!).
But in order for the person to attain the true afterlife, the body had to be preserved, so the Egyptians became very skilled at mummification. Mummification allowed the soul to reunite with the body and then they would be free to enjoy the glorious afterlife. Mummification was achieved by dehydrating the body using natron, which is a natural mineral which can be compared to a combination of baking soda and salt. After the body is drained of its liquids, the skin, muscles, and hair are all left intact. As long as you could afford the asking price to be mummified, the process was offered to anybody. But if you weren't as well as some of your wealthy friends, don't fret - with the right combination of spells, you too could bask in the glory of the afterlife!
When the mummy was fully prepared and ready, a priest would symbolically re-animate the body, and begin the "opening of the mouth" ceremony. This ceremony consisted of a priest speaking a spell and then touching the mummified body (or sarcophagus) with a copper or stone blade. This ceremony granted breath and speech to the mummy in the afterlife (there were similar spells which would allow other parts of the mummy's body to be re-animated, such as its arms and legs). After the mummy was moved to its tomb, the priest would recite some additional spells and prayers, which would assist the soul in navigating the afterlife. And once the tomb was sealed, no one was to enter it!
In the tombs of the deceased, funerary texts were buried with the body. These sacred texts consisted of additional spells and even instructions on how to navigate through the afterlife, and served as help for the soul if the person needed it to help ensure a bountiful afterlife journey. These texts became known as the "Book of the Dead" or the Funeral Papyri, and they were originally only intended for Pharaohs to ensure their resurrection and protection. These funerary texts eventually made their way into the tombs of high ranking officials before they were eventually offered to non-noble and non-official people in the society.
There's no doubt that ancient Egypt has a fascinating view on death. But it wasn't just death - it was what came after death that this ancient civilization became interested and heavily influenced in. There's a lot of great resources about Osiris, his death cult, and mummification available online, so if this interests you definitely continue researching it, because there's so much interesting information about this civilization available!