How does a space shuttle land on the moon after taking off from the Earth?
Actually, the recently retired space shuttle line of space vehicles never landed on the moon. The lunar landings were conducted between 1969 and 1972 with the Apollo missions. The space shuttle didn't go into service until the early 1980's, so it never actually landed on the moon. The vehicle used to land on the moon for the Apollo missions was called the lunar module.
The way the astronauts landed on and then left the moon is as follows. The entire spacecraft was fit into the top of a Saturn V rocket which took off from the Earth's surface. While climbing into space, the rocket would fall apart in stages until only the spacecraft remained. The spacecraft basically consisted of the lunar module (LM) attached to the command/service module (CSM). This spacecraft would reach lunar orbit and the lunar module would separate from the CSM and begin a controlled descent to the lunar surface. The LM would control its descent by firing its thrust against the moon's gravity to slow the fall. Upon making a vertical landing, the LM would power down for the lunar stay. When ready to leave, the bottom portion of the LM would remain on the surface of the moon and act as a launch pad. The upper, lighter portion of the LM would fire a new rocket to climb into lunar orbit. In orbit, the craft would dock with the orbiting CSM, the astronauts would transfer to the CSM, and the LM would be jettisoned to crash onto the surface of the moon. The astronauts would then ride the CSM back to Earth where the upper tip of it would re-enter the Earth's atmosphere and parachute land in the ocean to be picked up by the Navy. This is all demonstrated rather nicely in the movie Apollo 13. Another nice illustration of the entire moon missions is the HBO miniseries From the Earth to the Moon.
Interestingly, the space shuttle could never land on the surface of the moon because it depends on winged flight for its controlled descent to the surface of the Earth. Since the moon has no real atmosphere, the wings would not be able to glide the craft smoothly to the moon's surface.
Only lunar modules went to moon. I didn't think of that.