In the earliest times, the Egyptians buried their dead directly in the ground. Since Egypt's climate was, and still is, a very arid environment, a body may have been very well preserved if it was buried in a particularly sandy or dry spot. Often the bodies would have been buried curled up in a fetal position and interred with a few simple pots or other goods.
Eventually, kings or rich individuals longed for something better. For those who could afford them, the Egyptians built simple mud-brick tombs called mastabas. Mastaba is a modern Arabic word that means bench, as these tombs do look a bit like benches. These houses for the dead created something of a problem. Since the body was no longer buried in the sand there was nothing to naturally preserve it. When family members returned to the tomb to honor their ancestors, they discovered that the bodies had rotted in the comparatively cool, moist interiors of the mud-brick mastabas. They needed some way to preserve the remains of their ancestors.
The Egyptians developed a procedure known as "mummification," which was the process of drying out and preparing a body to ensure preservation. The practice of artificial mummification did not appear fully developed overnight however. Early mummification yielded mummies that were simply a body, possible dried in the sun or with natron salt, wrapped in linen. These wrappings were sometimes covered in plaster that had been molded to look like the person. Around the 4th dynasty, or about the time of the pyramids, embalmers began to remove the internal organs. It took many years of trial and error before the process reached its quality peak in the New Kingdom. Mummification was so expensive that only the pharaoh, royal family, and very wealthy individuals could afford to be preserved in this fashion. Throughout the history of ancient Egypt commoners would most likely have been buried in the sand in regular cemeteries, hopefully to be naturally mummified by the dry climate.
For the royals and the wealthy, mummification was probably not the most expensive part of their preparation for the afterlife. Mastabas soon grew to pyramids which gave way to rock cut tombs. Inside of these houses of eternity the ancient Egyptians packed any and all things that they believed could possibly be useful to them in the afterlife. However, regardless of whether a burial was above ground or below eventually it would probably have been robbed. Very few tombs survived the millennia intact. Those that have and have been recently excavated provide a plethora of details about the lives, beliefs, hopes and fears of the ancient Egyptians.