Answer:
They got out in space and climbed into the command module. The top of the crafts connected together in space. I wonder how it was possible though, because their suits were so big and it was enough room for the life support units on their back. This answer below is not the correct answer to your question.
The command module and lunar module have a docking bay, the Lunar module at the top of the module itself and the command module at the peak of the cone. the command module is the only part of the command/service module and lunar module that actually returned to earth. The lunar modules were jetisoned after the linkup from the lunar excursion and eventually crash landed on the moon. the service module, once separated from the command module burned up on reentry into the earth's atmosphere when the Earth's gravity caused it's orbit decayed enough. Most of the command modules for the Apollo Lunar Missions are housed in the Smithsonian Air and Space museums in Washington, DC and Dulles, VA. although there are a few in other places (Houston, Florida).