The tides occur because of the gravitational attraction exerted by both the moon and the sun on the Earth's surface. As these forces interact, they create a rise and fall in sea level which results in high and low tide periods.