>>10842445The Apollo Lunar Module (AKA the LEM) was a two stage vehicle. Each stage had it's own engine and propellant. The descent stage, with it's legs and other equipment necessary for landing, was what carried the second ascent stage down from low lunar orbit to the lunar surface. Once the task of landing on the moon was complete and the Apollo crew wished to return to the command module in low lunar orbit, the ascent stage will decouple from the descent stage to fly into an orbit where it'll meet the Apollo capsule. The ascent stage also contains the cabin that contains the astronauts and their gear necessary to explore the lunar surface.
Note that the descent stage is left on the lunar surface, that is because no parts in Apollo were reused. The ascent stage is brought back to Earth orbit attached to the capsule for extra living space for the astronauts, but it gets left to the heat of reentry and is thusly destroyed. Why no reusability? At the time rocket technology wasn't developed enough give such space vehicles both the spare capacity and capability to be reused. On top of that, the incredible goal of sending men to the moon and returning them safely before the 70s required a speedy development of equally incredible technologies and thus left little room to consider reusability when faced with other tasks that were never done before such as orbital rendezvouses and controlled landing on a non-terrestrial body. Those tasks were given priority over reusability to meet the time constraints of Apollo.