The Space Shuttle was designed for missions to low Earth orbit, typically around 200-600 kilometers above the Earth's surface. It was not capable of the high speeds and long duration flight needed for a lunar mission.
The missions to the moon were carried out by the Apollo program, which used the Saturn V rocket to launch the Apollo spacecraft.
To reach the moon, the Apollo spacecraft had to travel at a speed of about 25,000 miles per hour.