After the death of the last Ramses in 1085 BC, Egypt fell apart. Nobody knows exactly why, but there may have been a serious drought.
The Hittite and Mycenaean cultures collapsed at the same time, and various people from that area invaded Egypt, where they were called the Sea Peoples – the Philistines, the Lycians, and the Achaeans, among others (possibly the Trojans). Egypt beat these Sea Peoples off, but Egypt collapsed soon afterward anyway.
Egypt lost its control over Israel and Lebanon(this is the story of Moses) and was again ruled by different kings in the north and the south. Nubia got back its independence altogether, and had its own kings, and so did the Egyptian territories in Israel and Syria (this is the time of King David and King Solomon in the Bible). The north became richer than the south, and cities developed for the first time. But Egypt was weaker than usual, and the Libyans invaded several times, and ruled the north for a while. In the south, at Thebes, the priests of Amun continued to be very powerful.
Around 715 BC, a black Sudanese (or Kushite) king from south of Egypt, named Piankhy, invaded and conquered most of Egypt and founded Dynasty 25 of the Pharaohs. (This might be a sculpture of Piankhy’s successor, Shabaka)
This dynasty did not last long, because a new group in West Asia, the Assyrians, conquered Egypt in a series of wars ending in 664 BC and drove the Sudanese out of Egypt. The Assyrians could not really rule a land so far from their own capital at Nineveh, though, and soon another group of Libyan kings took over as Dynasty 26, with help from Greek and Lydian soldiers. These kings are called the Saites (sah-EETS), after their capital at Sais in the north of Egypt.
By 609 BC the Assyrian empire was collapsing, and the Saite kings even managed to reconquer some of Israel and Syria. But in 605 BC the new Babylonian king Nebuchadnezzar beat the Egyptians in battle and took Israel and Syria back. In 525 BC a new West Asian empire, the Persians, conquered Egypt, and this time they succeeded in ruling it.
Learn by doing: carving reliefs
Go on: the Persians conquer Egypt
Bibliography and further reading about the Third Intermediate Period:
Eyewitness: Ancient Egypt, by George Hart. Easy reading.
The Oxford History of Ancient Egypt, by Ian Shaw (2002).
History of Ancient Egypt: An Introduction, by Erik Hornung (1999). A college textbook. On the conservative side – not much on new developments.
Ancient Near Eastern History and Culture, by William H. Stiebing (2002). Expensive for a paperback, but brief and very up to date. And yes, it includes Egypt in the Near East.