The Apollo spacecraft’s had 3 parts! The command module (CM)
The crew’s quarters and flight control section.
The service module (SM)
CM and SM are what’s needed to drive and direct the spacecraft and bring it into orbit. As it remains in orbit the lunar module (LM) takes 2 of the crew to the lunar surface, support them on the Moon, and return them to the CSM in lunar orbit.Info from NASA.gov