From The Matrix wiki
The Matrix
The Matrix is a sophisticated neuro-interactive simulation designed by machines to pacify and harvest energy from the human population.
The Matrix is a massive, persistent virtual reality construct that mimics the world of the late twentieth century. It was created by sentient machines following the war against humanity to keep the captive human race in a state of controlled dormancy. By plugging human minds into this digital interface, the machines are able to utilise the biological bodies of their prisoners as a consistent source of bio-electric power.
Functionality and Control
Within the simulation, the laws of physics are merely programmed variables that can be manipulated by those who understand the system's underlying code. While most humans remain unaware of their true condition, individuals who have been freed by the resistance movement can re-enter the system to perform feats that defy conventional reality. However, the simulation is guarded by sentient security programmes known as Agents, who possess the ability to inhabit any human body connected to the grid and eliminate threats to the system's stability.
Significance
For the human survivors living in the underground city of Zion, the Matrix represents both a prison and a battlefield. The struggle to awaken humanity from this illusion forms the core of the conflict between the resistance and the machine collective. Accessing the Matrix requires a hardline connection, allowing rebels to download combat skills and tactical information directly into their brains, which is essential for their survival against the superior strength of the machines.