Ocean currents and waves are influenced by several factors. Countercurrents flow in the opposite direction of surface currents to fill voids where surface water has moved. Waves are formed based on wind speed, duration, and the expanse of open water. Wave size and type is also affected by these conditions, creating choppy, white-capped, or swelling waves. Upon reaching shallow water, waves can break and create surf that moves up the beach. Currents like undertow and rip currents also influence nearshore ocean water movement and transport water back out to sea. Tides are predictable ocean currents caused by the moon's gravity, resulting in high and low tides depending on its positioning.