Religion and the afterlife played a very important role in Ancient Egypt. The polytheistic religion guided every aspect of life for the Egyptians. There were as many as 2000 gods worshipped, the seat of political power - the Pharaoh - was even considered a god, and great time and expense was put into burial rites. Due to the Cataracts to the South and the vast desert on either side of the Nile, Egypt was cut off from the rest of the world, so their religion remained unchanged for thousands of years.
Before the monotheistic Islam was the dominant religion in Egypt, There were as many as 2000 gods and goddesses worshipped. Some, such as Amun (the creator), Ra (the sun), Horus (the heavens) and Isis (the Earth) were worshipped throughout Egypt, while others just had a local following. Due to this many gods doubled up or contradicted each other, but this never seemed to matter. Temples were considered where the Gods dwelled, and where the people could communicate with the gods, which they did several times a week. Priests maintained the temples and attended to the needs of the gods. Egyptians even saw Gods from religions from different countries as embodiments of their own gods. For example, they associated the Greek goddess Aphrodite with Hathor, their own goddess of love.
There were many different versions of the creation of the world in Ancient Egypt, But the most prominent States that only the ocean existed to begin with. Then, an egg appeared on the surface of the water, and from the egg hatched Ra, the sun. Ra had four children: two gods, Shu and Geb, and two goddesses, Tefnut and Nut. Geb became the earth, Nut became the sky, and Shu and Tefnut became the atmosphere, while Ra ruled over them all.
The pharaoh was the seat of government. He ruled over all of Egypt as King, but was also considered an embodiment of the gods. It was up to the Pharaoh to communicate with the gods, to make sure Egypt prospered.