The gravitational attraction of the moon causes the oceans to bulge out in the direction of the moon. Another bulge occurs on the opposite side, since the Earth is also being pulled toward the moon (and away from the water on the far side)Since the earth is rotating while this is happening, two tides occur each day.