Tides Are Gravity’s Gradient; Resonance Locks Orbits
The Moon pulls on Earth's oceans, so why does water bulge on both sides? The whole Earth is not pulled equally: the side nearer the Moon is pulled harder and the far side weaker. This difference in the pull, the gradient of gravity, stretches the water in two opposite directions and raises two bulges. The same gradient, acting over long times, brakes a body's spin until one face stays locked toward its partner, and integer-ratio resonances between orbital periods hold moons in step. In the first figure we change the distance and watch the two bulges appear.
Gravity falls off as the square of distance. So the near side is pulled harder than the center, and the far side weaker than the center. Subtract the center's pull from each point and a residual force remains: toward the Moon on the near side, away from the Moon on the far side. That is why the water stretches both ways and raises two bulges, not one. Slide the Moon closer and this difference grows sharply, as 1/r³.
The two bulges do not point exactly at the partner; the body's spin drags them slightly ahead. The partner's gravity then pulls on this misaligned bulge and applies a torque that brakes the spin. Left to act for a long time, this brake slows the spin until it matches the orbital rate. One face then stays turned toward the partner, which is called tidal locking. It is why the Moon always shows us the same face. Press play and watch the spin settle into synchronous rotation.
Spin does not only lock to orbit at 1:1. When the orbit is an ellipse, other integer ratios become stable too. Mercury is locked at 3:2, three spins for every two orbits. Drag the spin-to-orbit ratio and near 1:1 and 3:2 the value snaps into a stable well. In between, a non-commensurate ratio is nudged away by tides and cannot last.
Moons pull on each other too. When the orbital periods of two moons form an integer ratio, the conjunction where they line up recurs at the same place every time. The small tugs then pile up at the same point and hold the orbits together. Jupiter's Io, Europa, and Ganymede are locked in a 1:2:4 Laplace resonance. Set the period ratio to an integer and the conjunction points gather at a few longitudes; detune it and they scatter around the circle.
Tidal forces try to stretch a moon while the moon's own gravity tries to hold it together. Bring a moon too close to its planet and the stretching tide wins over its self-gravity, so the moon can no longer stay in one piece and spreads along its orbit as a ring. This boundary distance is the Roche limit, about d ≈ 2.44·R·(ρplanet/ρmoon)1/3. Slide the moon inward and the moment d drops below the Roche limit it turns into a ring. Saturn's rings are thought to have formed this way.