How about you explain how they managed to do this.

*Sigh*
Managed to do what? We've already gone over the getting to the Moon part. The rest is similar; they fire a rocket motor to change from one orbit to another.
The TLI burn of the S-IVB put the craft in an elliptical orbit that intersects the Moon's orbit (lower left part of your diagram). As it nears the Moon, this orbit is perturbed by the Moon's gravity; for the early Apollo lunar missions, the orbit was designed so that, after passing the Moon, if nothing was done, the new orbit, after being influenced by the Moon's gravity, would return the craft to the Earth along a favorable trajectory - the free-return trajectory[nb]The calculations necessary to design this are
not trivial, but could be done, even using "only" the computing power available in the '60s.[/nb]. As it was, a Lunar Orbit Injection burn of the Command Module's main engine was accomplished, which altered the orbit enough so that the craft entered an elliptical orbit about the Moon (larger loop, lower right), clockwise in the diagram then another burn to maneuver into the desired low circular orbit (the smaller loop inside larger loop around the Moon, still at lower right).
A few days later, the craft is still orbiting the Moon (still clockwise, of course, at upper right in this drawing), after the Moon moved partway around its orbit around the Earth while at the same time the CM is orbiting the Moon. The diagram is showing the location of the Moon at approximate times of arrival and departure, but not the time between; is that confusing you?
The CM's main engine is fired again to accelerate the craft away from the Moon (upper right, just below the Moon in the drawing) and into an orbit that intercepts the Earth's outer atmosphere (left, above earth in the drawing), which slows the craft as it passes around the planet until it is traveling slow enough to deploy parachutes and make a soft landing in the ocean (far left of the drawing).
In addition, the diagram shows the lander's path from lunar orbit to the surface and back.
Keep in mind that the drawing is schematic; it isn't to scale.
Does that help?