Gravity from the moon and sun exerts a force on the oceans, causing sea levels to rise and fall regularly. While the sun and moon-especially the moon-set the tides in motion, other factors play into the behavior of tides, including the intertia of water and the geography of the ocean bottom and the shoreline. Storm waves crashing against beaches through the cycles of high tides can wash away sand dunes, buildings, and roads.