The surface of the ocean undergo oscillatory motion which causes waves to flow along the interface between the water and the air.
The oscillatory motion occurs because of a dynamic equilibrium between the downward gravitational force and the upward thrusts of the water due to various factors such as wind.
These types of waves are known as gravity waves or surface waves (as they occur at the surface of the ocean).