People have probably been living in Egypt at least since 100,000 BC, when humans first started to move out of Ethiopia north around the Arabian Peninsula. While a lot of Egypt is a desert, the area right along the Nile River grows lots of plants and is an easy place to live.Gradually more people came to Egypt, and those people had lots of kids. Egypt became more crowded, so there was more need for a unified government. For a while there seem to have been two kingdoms, which we call Upper Egypt (in the south) and Lower Egypt (in the north). Around 3000 BC, at the beginning of the Bronze Age, the king of Upper Egypt conquered the king of Lower Egypt and made Egypt into one kingdom, called Egypt. People called the ruler of this new kingdom the Pharaoh.
From that time until around 525 BC, when the Persians conquered Egypt, we divide Egypt's history into six different time periods. In the Old Kingdom (2686-2160 BC), the Egyptians built the Pyramids as tombs for their pharaohs. Then about 2200 BC there seems to have been a change in the climate, and Egypt came apart into a bunch of smaller kingdoms. We call this the First Intermediate Period (2160-2040 BC).
By 2040 BC, the pharaohs managed to pull Egypt back together again to form the Middle Kingdom (2040-1633 BC), but the Middle Kingdom pharaohs were never as powerful as the Old Kingdom pharaohs, and they didn't build pyramids anymore. Around 1800 BC, the Middle Kingdom pharaohs lost power again. We call this the Second Intermediate Period (1786-1558 BC). During the Second Intermediate Period, some people from the north called the Hyksos invaded Egypt and ruled Lower Egypt for a while. The Hyksos had horses and chariots, and soon the Egyptian army also learned to use horses and chariots.
Then in 525 BC, Cambyses, the Persian King, brought an army to Egypt and conquered Egypt, and made Egypt part of the Persian Empire. The Egyptians didn't like being part of the Persian Empire, but they weren't strong enough to break away. When Alexander conquered the Persian Empire in 332 BC, he also took over Egypt at the same time, and so Alexander's Greek successors ruled Egypt after that (332-30 BC) This time is also called the Hellenistic. The Hellenistic was the time of Cleopatra, who was a Greek woman and also pharaoh in Egypt. After Cleopatra died, the Romans conquered Egypt and it became part of the Roman Empire for hundreds of years (30 BC-700 AD). Finally about 660 AD, invading Umayyad armies conquered Egypt and made Egypt part of the Islamic Empire which replaced the Roman Empire.