Anyone who has spent time at the seaside will have noticed the water creeping up the beach and retreating again. This regular rise and fall of the sea is driven mainly by the Moon, with help from the Sun. The way it works is a fine example of gravity at a planetary scale.
The pull of the Moon
The Moon's gravity pulls on everything on Earth, but the pull is slightly stronger on the side of the planet facing the Moon and weaker on the far side. Water, being free to move, responds to this difference. The result is a bulge of ocean water on the side nearest the Moon.
Two tides a day
There is also a second bulge on the opposite side of the Earth, where the Moon's pull is weakest and the water is effectively left behind. As the Earth rotates, most coastlines pass through both bulges, giving roughly two high tides and two low tides each day. Because the Moon moves along its orbit, the timing of the tides shifts a little later each day.
Spring and neap tides
The Sun also creates tides, though its effect is a little under half that of the Moon. When the Sun and Moon line up, around new moon and full moon, their effects combine to produce spring tides with especially high and low water. When they pull at right angles, during the Moon's quarter phases, the tides are weaker and are known as neap tides.
Local differences
The shape of coastlines and the sea floor has a huge influence on how tides behave in a particular place. Funnel-shaped bays and estuaries can amplify the tidal range dramatically, as seen in the Bristol Channel, while some enclosed seas, such as the Mediterranean, experience only small tides. This is why tide tables are calculated for specific locations rather than for the whole coast.