While the Apollo LM is the most recognizable part, it was actually a part of the larger Apollo Command/Service Module (CSM) spacecraft. The CSM served as the astronauts' transportation to the moon and back, providing life support, propulsion, and a command center.
So, to be completely accurate, the astronauts traveled to the moon in the Apollo CSM and then landed on the moon in the Apollo LM.