Mordor is the dwelling place of Sauron, in the southeast of Middle-earth to the East of Anduin, the great river. Frodo and Sam went there to destroy the One Ring. Mordor was unique because of the three enormous mountain ridges surrounding it, from the North, from the West and from the South, that protected this land from an unexpected invasion by any of the people living in those directions.
Mordor was protected from three sides by mountain ranges, arranged roughly rectangularly: Ered Lithui in the north, Ephel Dúath in the west, and an unnamed (or possibly still called Ephel Dúath) range in the south. In the northwest corner of Mordor the deep valley of Udûn was the only entrance for large armies, and that is where Sauron built the Black Gate of Mordor. In front of the Morannon lay the Dagorlad or the Battle Plain. Sauron's main fortress Barad-dûr was at the foothills of Ered Lithui. To southwest of Barad-dûr lay the arid plateau of Gorgoroth and Mount Doom; to the east lay the plain of Lithlad. A narrow pass led through Ephel Dúath and the fortress of Minas Morgul (earlier Minas Ithil) was guarding that; an even more difficult pass was guarded by the giant spider Shelob and the fortress of Cirith Ungol. Another known fortress was Durthang in northern Ephel Dúath.
The southern part of Mordor, Nurn, was slighly more fertile, and moist enough to carry the inland sea of Núrnen. Nurn was made somewhat fertile because the ash blown from Mount Doom left its soil nutrient rich, thus allowing dry-land farming. Unfortunately, the inland sea of Núrn was salty, not freshwater.
Mordor was a relic of the devastating works of Morgoth, apparently formed by massive volcanic eruptions. It was given the name Mordor already before Sauron settled there, because of its volcano Orodruin and its eruptions. Sauron however was the first to settle there.
See also: Timeline
Sauron settled in Mordor 1,000 years after the end of the First Age, and it remained the pivot of his evil contemplations for the whole of the Second and Third Ages of Middle-earth. In the north-western corner of this land stood Mount Doom or Orodruin, where Sauron had forged the One Ring. Near Orodruin stood Sauron's stronghold Barad-dûr. After this time, Sauron was known as the Dark Lord of Mordor.
For two and a half thousand years, Sauron ruled Mordor uninterruptedly. Having wrought the Ring, it was from there that he launched the attack upon the Elves of Eregion. He was repelled by the Men of Númenor. He fought against the Men again, almost a thousand years later; that time, he was captured by the Númenóreans and brought to their island kingdom, eventually causing its destruction (see Akallabêth). Immediately after Númenor's destruction, Sauron returned to Mordor as a spirit and resumed his rule.
The Last Alliance and Third Age
Sauron's rule was interrupted yet again when his efforts to overthrow the surviving Men and Elves failed, and they fought their way back to their foe's domain. After several years of siege, forces of the Last Alliance of Elves and Men came into Mordor. Sauron was defeated in a final battle on the slopes of Orodruin. For about a thousand years, Mordor was guarded by Gondor in order to prevent any evil forces from breaking out.
However Gondor had failed in the long run, and deprived of guard, Mordor began to fill with evil things again. Minas Ithil was conquered by the Nine Ringwraiths; other fortifications that were supposed to defend Gondor from the menace inside Mordor were turned into a means of shielding Mordor. By the time Sauron returned into Mordor after his false defeat in Dol Guldur (in the events that took place at the time of Bilbo Baggins's quest), Mordor was protected too well to be captured by any military might that was available in Middle-earth at the end of the Third Age. In the north of Mordor during the War of the Ring were the great garrisons and forges of war, while surrounding the bitter inland Sea of Núrnen to the south lay the vast fields tended for the provision of the armies by hordes of slaves brought in from lands to the east and south.
War of the Ring
During the War of the Ring, Sauron gathered all his forces to Mordor. After the Battle of the Pelennor Fields, a Host of the West went to the Black Gate. Sauron sent his army to destroy the Men of Gondor and Rohan, but then Frodo Baggins destroyed the One Ring and Mordor fell. The Dark Tower, the Black Gate and the Towers of Teeth collapsed to ruin. Mount Doom exploded. Both Sauron and his Ringwraiths were apparently destroyed.
After the ultimate defeat of Sauron, Mordor became mostly empty again as the Orcs inside it fled or were killed. Crippled by thousands of years of abuse and neglect, but capable of sustaining life, the land of Mordor was given to the defeated foes of Gondor as a consolation, as well as to the freed slaves of Nurn who were formerly forced to farm there to feed the armies of Mordor.
Mordor actually has two meanings: "The Black Land" in Tolkien's contrived language Sindarin, and "The Land of Shadow" in Quenya. The root mor ("dark", "black") also appears in Moria. Dor ("land") also appears in Gondor ("stone-land") and Doriath ("fenced land"). The Quenya word for Shadow is "mordo".
A proposed etymology out of the context of Middle-earth is Old English morthor, which means "mortal sin" or "murder". (The latter are descended from the former.) It is not uncommon for names in Tolkien's fiction to have relevant meanings in several languages, both those invented by Tolkien, and "real" ones, but this of course happens with any two languages. Mordor is also a name cited in some Nordic mythologies referring to a land where its citizens practise evil without knowing it, imposed on themselves by the society long created for that purpose. This quite fits with Tolkien's Mordor.
In The Atlas of Middle-earth, Karen Wynn Fonstad assumed that the lands of Mordor, Khand, and Rhûn lay where the inland Sea of Helcar had been, and that the Sea of Rhûn and Sea of Núrnen were its remnants. The atlas was however published before The Peoples of Middle-earth, where it turned out that the Sea of Rhûn and Mordor existed already in the First Age.