The Lunar Module consisted of two main parts: the Descent Stage and the Ascent Stage. The Descent Stage contained the landing engines, fuel tanks, and legs, and it provided stability during the landing. The Ascent Stage contained the crew cabin, life support systems, and ascent engine, and it was used to lift the astronauts back into orbit around the moon.
Once in orbit, the Ascent Stage would dock with the Command and Service Module (CSM) and the astronauts would transfer back into the CSM for their return journey to Earth.