The Apollo spacecraft was composed of three parts designed to accomplish the American Apollo program's goal of landing astronauts on the Moon by the end of the 1960s and returning them safely to Earth. The expendable (single-use) spacecraft consisted of a combined command and service module (CSM) and an Apollo Lunar Module (LM). Two additional components complemented the spacecraft stack for space vehicle assembly: a spacecraft–LM adapter (SLA) designed to shield the LM from the aerodynamic stress of launch and to connect the CSM to the Saturn launch vehicle and a launch escape system (LES) to carry the crew in the command module safely away from the launch vehicle in the event of a launch emergency.
The design was based on the lunar orbit rendezvous approach: two docked spacecraft were sent to the Moon and went into lunar orbit. While the LM separated and landed, the CSM remained in orbit. After the lunar excursion, the two craft rendezvoused and docked in lunar orbit, and the CSM returned the crew to Earth. The command module was the only part of the space vehicle that returned with the crew to the Earth's surface.
The LES was jettisoned during launch upon reaching the point where it was no longer needed, and the SLA remained attached to the launch vehicle's upper stage. Two uncrewed CSMs, one uncrewed LM, and one crewed CSM were carried into space by Saturn IB launch vehicles for low Earth orbit Apollo missions. Larger Saturn Vs launched two uncrewed CSMs on high Earth orbit test flights, the CSM on one crewed lunar mission, the complete spacecraft on one crewed low Earth orbit mission, and eight crewed lunar missions. After conclusion of the Apollo program, four CSMs were launched on Saturn IBs for three Skylab Earth orbital missions and the Apollo-Soyuz Test Project.
The major part of the Apollo spacecraft was a three-man vehicle designed for Earth orbital, translunar, and lunar orbital flight, and return to Earth. This consisted of a command module supported by a service module, built by North American Aviation (later North American Rockwell).
The command module was the control center for the Apollo spacecraft and living quarters for the three crewmen. It contained the pressurized main crew cabin, crew couches, control and instrument panel, Primary Guidance, Navigation and Control System, communications systems, environmental control system, batteries, heat shield, reaction control system to provide attitude control, forward docking hatch, side hatch, five windows, and a parachute recovery system. It was the only part of the Apollo/Saturn space vehicle that returned to Earth intact.
The service module was unpressurized and contained a main service propulsion engine and hypergolic propellant to enter and leave lunar orbit, a reaction control system to provide attitude control and translational capability, fuel cells with hydrogen and oxygen reactants, radiators to dump waste heat into space, and a high gain antenna. The oxygen was also used for breathing, and the fuel cells produced water for drinking and environmental control. On Apollo 15, 16 and 17 it also carried a scientific instrument package, with a mapping camera and a small sub-satellite to study the Moon.
A major portion of the service module was taken up by propellant and the main rocket engine. Capable of multiple restarts, this engine placed the Apollo spacecraft into and out of lunar orbit, and was used for mid-course corrections between the Earth and the Moon.
The service module remained attached to the command module throughout the mission. It was jettisoned just prior to reentry into the Earth's atmosphere.
The Apollo Lunar Module was a separate vehicle designed to land on the Moon and return to lunar orbit, and was the first true "spaceship" since it flew solely in the vacuum of space. It consisted of a descent stage and an ascent stage. It supplied life support systems for two astronauts for up to four to five days on the Apollo 15, 16 and 17 missions. The spacecraft was designed and manufactured by the Grumman Aircraft Company.
The descent stage contained the landing gear, landing radar antenna, descent propulsion system, and fuel to land on the Moon. It also had several cargo compartments used to carry, among other things: the Apollo Lunar Surface Experiment Packages ALSEP, the modularized equipment transporter (MET) (a hand-pulled equipment cart used on Apollo 14), the Lunar Rover ( Apollo 15, 16 and 17), a surface television camera, surface tools, and lunar sample collection boxes.
The ascent stage contained the crew cabin, instrument panels, overhead hatch/docking port, forward hatch, optical and electronic guidance systems, reaction control system, radar and communications antennas, ascent rocket engine and propellant to return to lunar orbit and rendezvous with the Apollo Command and Service Modules.
The spacecraft–LM adapter (SLA), built by North American Aviation (Rockwell), was a conical aluminum structure that connected the service module to the Saturn S-IVB rocket stage. It also protected the LM, the service propulsion system engine nozzle, and the launch-vehicle-to-service-module umbilical during launch and ascent through the atmosphere. 
The SLA was composed of four fixed 7-foot-tall (2.1 m) panels bolted to the Instrument Unit on top of the S-IVB stage, which were connected via hinges to four 21-foot-tall (6.4 m) panels which opened from the top similar to flower petals.
The SLA was made from 1.7-inch-thick (43 mm) aluminum honeycomb material.  The exterior of the SLA was covered by a thin (0.03–0.2 in or 0.76–5.08 mm) layer of cork and painted white to minimize thermal stresses during launch and ascent. 
The service module was bolted to a flange at the top of the longer panels, and power to the SLA multiply-redundant pyrotechnics was provided by an umbilical. Because a failure to separate from the S-IVB stage could leave the crew stranded in orbit, the separation system used multiple signal paths, multiple detonators and multiple explosive charges where the detonation of one charge would set off another even if the detonator on that charge failed to function.
Once in space, the astronauts pressed the 'CSM/LV Sep' button on the control panel to separate the CSM from the launch vehicle. Detonating cord was ignited around the flange between the SM and SLA, and along the joints between the four SLA panels, releasing the SM and blowing apart the connections between the panels. Dual-redundant pyrotechnic thrusters at the lower end of the SLA panels then fired to rotate them around the hinges at 30–60 degrees per second.
On all flights through Apollo 7, the SLA panels remained hinged to the S-IVB and opened to a 45-degree angle, as originally designed. But as the Apollo 7 crew practiced rendezvous with the S-IVB/SLA containing a dummy docking target, one panel did not open to the full 45 degrees, raising concern about the possibility of collision between the spacecraft and the SLA panels during docking and extraction of the LM in a lunar mission. This led to a redesign using a spring-loaded hinge release system which released the panels at the 45-degree angle and pushed them away from the S-IVB at a velocity of about 8 km/h (5.0 mph), putting them a safe distance away by the time the astronauts pulled the CSM away, rotated it through 180 degrees, and came back for docking.
The LM was connected to the SLA at four points around the lower panels. After the astronauts docked the CSM to the LM, they blew charges to separate those connections and a guillotine severed the LM-to- instrument-unit umbilical. After the charges fired, springs pushed the LM away from the S-IVB, and the astronauts were free to continue their trip to the Moon.
The Apollo launch escape system (LES) was built by the Lockheed Propulsion Company. Its purpose was to abort the mission by pulling the CM (the crew cabin) away from the launch vehicle in an emergency, such as a pad fire before launch, guidance failure, or launch vehicle failure likely to lead to an imminent explosion.
The LES included three wires that ran down the exterior of the launch vehicle. If the signals from any two of the wires were lost, the LES would activate automatically.  Alternatively, the Commander could activate the system manually using one of two translation controller handles, which were switched to a special abort mode for launch. When activated, the LES would fire a solid fuel escape rocket and open a canard system to direct the CM away from, and off the path of, a launch vehicle in trouble. The LES would then jettison and the CM would land with its parachute recovery system.
If the emergency happened on the launch pad, the LES would lift the CM to a sufficient height to allow the recovery parachutes to deploy safely before coming in contact with the ground.
In the absence of an emergency, the LES was routinely jettisoned about 20 or 30 seconds after the launch vehicle's second-stage ignition, using a separate solid-fuel rocket motor manufactured by the Thiokol Chemical Company. Abort modes after this point would be accomplished without the LES. The LES was carried but never used on four uncrewed Apollo flights, and fifteen crewed Apollo, Skylab, and Apollo-Soyuz Test Project flights.
The disposition of all command modules, and all unflown service modules is listed at Apollo command and service module#CSMs produced. (All flown service modules burned up in the Earth's atmosphere at termination of the missions.)
The disposition of all lunar modules is listed at Apollo Lunar Module#Lunar modules produced.