By the time waves reach the shore, the water itself is moving, not just the energy traveling through it.
Breaking waves, or surf, occurs when the wave reaches water of a depth equal to or less than one half of its wavelength, the distance between waves.
The land slows down the water at the bottom of the wave, causing the faster upper part, the crest of the wave, to rise and arc, finally crashing down on itself.
The crest breaks because it outraces the lower part of the wave and winds up hanging in the air. Gravity draws it back down.