Tides are primarily caused by the gravitational forces of the moon and the sun in relation to the Earth. The gravitational pull of the moon primarily creates two high tides and two low tides each day as the Earth rotates. The sun also contributes to tides, but to a lesser extent. Other factors that can influence tides include the shape of the coastline, the depth of the ocean, and the Earth's rotation.