Interstellar's plot is built on several major twists. The first is the revelation that Plan A—saving the population of Earth by moving them through space—was a lie. Professor Brand solved his gravity equation long ago but realized it was useless without data from within a black hole's singularity, an impossible task. He concocted Plan A to give humanity hope and ensure support for Plan B: a 'population bomb' of 5,000 frozen embryos to colonize a new world, abandoning everyone on Earth.
The second major twist is the betrayal by Dr. Mann. Believed to be the most courageous of the Lazarus mission astronauts, he is found to have falsified data about his planet's viability out of sheer desperation and fear of dying alone. His attempt to kill Cooper and steal the Endurance reveals the dark side of the survival instinct.
The film's climactic reveal is the identity of Murph's 'ghost.' After jettisoning into the Gargantua black hole to save Brand, Cooper doesn't die. He enters a 'tesseract,' a four-dimensional space constructed by hyper-advanced future humans. Here, time is presented as a physical dimension. Cooper realizes he is Murph's ghost; he was the one who, through gravity, sent the coordinates to NASA and, most crucially, relays the quantum data collected by TARS from the singularity to Murph by manipulating the second hand on the watch he gave her. This act allows the adult Murph to solve the gravity equation, making Plan A a reality and saving everyone on Earth. This confirms that the 'they' who created the wormhole were not aliens, but humanity itself in a highly evolved future state, creating a causal loop to ensure their own existence. Cooper is then ejected from the tesseract and rescued, eventually reuniting with a very elderly Murph before heading out to find Brand, who is establishing the new human colony on Edmunds' planet.