Well, first, the space shuttle never went to the moon. It never left Earth orbit.
When the Apollo missions were flown, they left Earth with two craft - the Command/Service Module, and it was attached to the Lunar Module. After entering lunar orbit, two guys would climb into the LM, detach from the CSM, and descend to the surface under power.
The LM was in two parts; it had a lower stage, with the descent engine and the landing legs, and carried most of the equipment to be left on the moon. The upper stage was where the crew were; it also had an engine to ascend back into orbit.
After exploring the surface, the two astronauts would leave whatever they could - including boots and backpacks, and climb back into the upper stage. At the proper time, they fired the engine, leaving the lower stage on the surface, and they returned to orbit in the upper stage.
Next, they'd dock with the CSM once again, and transfer the crew and soil samples out of the ascent stage of the LM... then, they'd send it to crash into the surface.
On the farside of the moon, they'd fire the CSM's engine, building speed (about 3,000 mph), and leave lunar orbit, heading back to Earth. For about 3 1/2 days, they'd "fall" all the way back to Earth, accelerating from 3000 mph to about 25,000 mph just before hitting Earth's atmosphere.
Then, they'd jettison the Service module, and re-enter the atmosphere in the command module - it had to hit the edge within a margin of about 4 degrees; any shallower, and they'd skip off the atmosphere back into space (and, at 25,000mph, they wouldn't come back...) Any *steeper*, and the heat would built up too quickly, and they'd incinerate. They had to hit it at the right angle to slow the craft, but not too fast. Once they were within the atmosphere, a drogue chute would pull the main parachutes out, and they'd splashdown in the ocean. From atmospheric contact to splashdown was about 8 or 9 minutes, if memory serves...