WARNING! This writeup contains pretty big spoilers for all of The Matrix movies, as well as The Animatrix, and the Enter The Matrix, The Matrix Online, and The Path of Neo video games. Don't say I didn't warn you!
"If the war was over tomorrow, Zion's where the party would be."
"It's a city?"
"The last human city."
* * *
In The Matrix Trilogy, Zion is a city of approximately 250,000 people, all of whom are the last remaining free humans on the planet. Zion, their home, is the last remaining city. Due to the war with the machines that happened for some 50 years while the humans still lived on the planet's surface, much destruction was perpetrated by both humans and machines, one race trying to eradicate the other. The sky was blackened, nuclear weapons were detonated, seas were filled with human and machine remains, and one by one the continents that had previously been home to all humans were overrun by the unstoppable forces of the machines. The march of the machines began in their home city, Zero One (or 01), in the Middle East, and after humanity soundly rejected their proposal for peace, the machines issued forth from there to cover all land.
By the end of the 21st century, the machines ruled. Every human that hadn't been killed in the wars was hooked up to the Matrix, a computer-generated world that the machines created to keep the humans preoccupied while extracting their bioelectricity over the course of each of their lives, which were spent in slime-filled pods, each a single node in a planet-wide network of other pods, all feeding the machines' multitude of power transformers, conductors, and processors.
Soon after the Matrix was in place, a man was born inside, just like everyone else. This man, whose name was never told, was the first version of The One. He was the first to wake from his machine-controlled slumber and leave his pod in the physical, non-Matrix world. Somehow, he made his way down toward the center of the earth and founded the city of Zion. Presumably, with knowledge he had gained while still hard-wired to the Matrix, he managed to construct an independent means to reconnect himself with it to begin freeing others from it, so Zion could be built and populated. These events were likely perpetuated by the machines themselves, as a result of an anomaly in their code that resulted in the creation and subsequent powers of The One, and the five others that followed him, all of whom claimed the title "The One."
This anomaly, as we learn in The Matrix Reloaded, is systemic, and is not correctable despite the greatest efforts of the machines. Thus, at the end of every generation The One dies, and a new One is born. As we find out from The Architect, the program that designed the Matrix, the purpose of The One is to return to The Source (presumably the source code from whence he or she came), and up until the sixth One, all had done so, and as they did so, they precipitated the destruction of Zion and (almost) all of its inhabitants. Before their reintegration with The Source, they were allowed to choose 23 individuals, 16 male, 7 female, to rebuild and repopulate Zion. As stated by The Architect, failure to comply with the destruction and rebuilding of Zion results in a system crash that would end the lives of every human still connected to the Matrix, which probably numbered in the billions, although the machines were prepared to accept minimal numbers of survival because they need human bioelectricity themselves to survive. The sixth One, Neo, chose not to return to The Source, but to return to the Matrix in an attempt to save Zion as it existed in his era, thus breaking the cycle that had continued unabated for six generations until then.
In anticipation of The Architect's preconception that The One will once again return to The Source, the machines began digging down through the surface of the earth, making way to Zion, where they intended to destroy it for a sixth time. Thus, a race was eventually started against the machines to try to find a way to stop them. Most of Zion's defensive forces tarried round its perimeter as a kind of roadblock against the more quickly mobile machines (i.e., sentinels), though not all of those forces remained on guard duty at the gates of Zion.
The Nebuchadnezzar (one of the defensive hoverships) was destroyed just after Neo made his choice to return to the Matrix instead of The Source. Two other hoverships, the Mjolnir (aka the Hammer) and the Logos were both out on scouting missions when they detected the Nebuchadnezzar's destruction and rescued its survivors, which included Neo, Morpheus, Trinity, and Link. After some deliberation, the Logos is found disabled but otherwise unharmed, along with its crew (Captain Niobe, first mate Ghost, and operator Sparks). It is this point that Neo beseeches the captains of the Logos and the Hammer to let him use one of them to go to Zero One to try to make peace with the machines and end the war. Roland, the captain of the Hammer, thinks Neo is insane and completely bawks at the idea, basically telling Neo to go fuck himself. Niobe, however, allows him to take her ship. With Trinity, his one true love, in tow, Neo leaves for Zero One.
Eventually he and Trinity find it, and are attacked as they reach it. Neo repels the attacks and the Logos crashes into a tower, where Trinity is killed and Neo is given his true purpose. He walks out onto a balcony of sorts in the tower, where he meets a machine emmissary, and offers to stop the program "Smith," which has grown beyond the machines' control, in exchange for peace between Zion and the machines. After a brutal fight against Smith, he is successful, though he was killed in the process.
"It is done," says the machine consciousness. At that time, all the sentinels and drillers infesting and gradually destroying Zion stop instantaneously, and silently retreat, leaving Zion and the rest of its inhabitants to their fate instead of its sixth destruction and rebuilding.
* * *
Zion itself seems to have been constructed far below the earth's crust in a very large tunnel leading straight down. It looks to be about a mile wide and perhaps twenty miles tall from end to end. Foot bridges crisscross it, width-wise, and dormitory-like apartments line every chasm of its outer perimeter. At the base of the tunnel lies the temple, where communal gatherings are typically held, as well as the meeting chambers for the governing council. At the top of the tunnel is the dock, a huge domed structure resembling a concrete sports arena, where all the ships would take off or land, bound for missions between Zion and the surface of the planet, which is where the Matrix broadcast frequencies could be accessed. A force of large, human-piloted robotic mechs called APUs were also a part of the dock, and were used primarily to cover landing ships against the open dock doors when landings and take-offs were made, and also for defensive purposes against sentinels during the siege. The dock was destroyed and sealed off during a siege when the drillers and sentinels finally made it down far enough to penetrate Zion's defenses.
Most of the city was constructed of varying kinds of steel along with the natural formations of rock and earth that occur at the depth of the city. A particularly large cavern near the bottom controlled the city's utilities such as air and water recycling, electricity, and environmental controls for heating and cooling.
Many of the approximately 250,000 inhabitants were seemingly of mixed ethnic background, although in such an eventuality (i.e. all peoples being integrated into a singular society where their ancestors were machine-bred), all races would become largely indistinguishable from all other races, and the people of Zion reflect that. Most are medium/dark-skinned, with dark hair and dark eyes -- seemingly kind of an equal blend between pure African, pure European, and pure Asian -- though there were some that were more light-skinned or more heavily dark-skinned, too. The people of Zion had at that time been coexisting with each other for approximately 100 years, which seems like enough time for near-complete racial integration without discrimination.
The tentative peace between the machines and the people of Zion may last forever; it may not. We will probably never know. Whatever the case, this is its history from its founding to present.