Tides are the rise and fall of sea levels caused by the combined effects of the gravitational forces exerted by the moon
The Moon is Earth's only known natural satellite,There are a number of near-Earth asteroids including 3753 Cruithne that are co-orbital with Earth: their orbits bring them close to Earth for periods of time but then alter in the long term . These are quasi-satellites and not true moons. For more...

 and the sun
The Sun is the star at the center of the Solar System. It is almost perfectly spherical and consists of hot plasma interwoven with magnetic fields...

 and the rotation of the Earth.

Most places in the ocean usually experience two high tides and two low tides each day (semi-diurnal tide), but some locations experience only one high and one low tide each day (diurnal tide). The times and amplitude of the tides at the coast are influenced by the alignment of the sun and moon, by the pattern of tides in the deep ocean (see figure 4) and by the shape of the coastline and near-shore bathymetry
Bathymetry is the study of underwater depth of lake or ocean floors. In other words, bathymetry is the underwater equivalent to hypsometry. The name comes from Greek βαθύς , "deep", and μέτρον , "measure"...

 (see figure 7).

Tides vary on timescales ranging from hours to years due to numerous influences.