Tides are created by the gravitational attraction of the moon and the sun, with the moon having the much larger effect.  The tides can be predicted because of the predictability of the moon's orbit around the earth.  The moon takes 24 hours and 50 minutes to orbit the earth, and in this time two high tides and two low tides will rise and fall on the seashore.  The time and height of each tide will be repeated in approximately 19 years.
The rise and fall is caused by two waves or bulges on the surface of the sea, one beneath the pull of the moon on one side of the earth, the other away from it on the other side of the earth.  This wave, measuring 20,000 kilometers from crest to crest, is the world's longest wave.
Everything on earth, including the atmosphere and the earth's crust is lifted by the tidal forces.  Even our own bodies are affected, weighing about 1/6,000,000 less when both sun and moon are overhead.
The tide-wave is fixed in position by the force of the moon's gravity, and the earth rotates beneath it.  When the edge of a continent slips beneath the crest of the wave, the sea level along the shore is raised causing a high tide.  When the shore then slips beneath the following trough in the wave, the sea level falls, causing low tide.  In mid ocean, the height of this wave is relatively low, but when the crest encounters the coastal waters of inlets or bays, its energy is confined by the shallow waters and narrowing channels and as a result the height of the wave increases.
The difference between the high tide level and the following low tide level - the tidal range - can measure anywhere from a few centimetres to several metres.