The spacecraft was composed of the "CSM" or Command Service Module and the "LM" or Lunar Module. The CSM made the trip to the moon and back, with the conical Command Module splashing down in the ocean. The Lunar Module would descend and land and serve as the astronaut's home for the hours they visited. Then the Ascent Module would return them to dock with the CSM. Ultimately, the Lunar module was discarded.
It was the LM which served as a lifeboat on Apollo 13 and enabled them to return after the explosion.