How waves are formed...

The oceans are in constant motion. The gravitational pull of the sun and moon oscillates the surface of the oceans twice a day while the wind agitates it into waves.
The surface of the sea exerts a frictional drag on the bottom layer of a wind blowing over it, and this layer exerts a frictional drag on the layer above it, and so on. The top layer has the keast frictional drag exerted on it which means that the layers of air move forward at different speeds. The air tumbles forward and finally develops a circular motion. This motion causes a downward pressure (DP) on the surface at its front, and an upward pressure (UP) at its rear, and this causes the surface to take on the form of a wave.
The back of the wave tumbles forward but it moves back later and slows the forward movement at the front of the wave. The wave now grows bigger.

The shape of the ocean floor and the direction of the wind are the two main factors that cause a wave to break (crash). The best surfing waves are usually caused by underwater features like sand banks, rocky points or reefs. To get the hollow tubes that surfers love, the ocean floor has to slope steeply. Waves tend to break more gently and farther out if the slope of the ocean floor is gradual. Surfers also prefer it when the wind blows from the beach out to the sea, which is called offshore because it helps to maintain clean waves, which are better to surf. If the wind blows from the ocean to the beach (onshore) or across the beach (cross-shore), it will cause the waves to be messy and choppy.