Once the spacecraft were on their trajectory toward the Moon, the CM (command module) pulled the LM (lunar module) from its compartment, and the two traveled together until they orbited the Moon.