Waves can tell when they’re approaching a shore and actually turn to line up with it.
What makes waves, of course, is wind blowing across the water’s surface. But it can’t be that the wind is always blowing the waves straight in to shore. Out in the ocean, the wind may be blowing every which way.
The waves we observe at the shore are only those that are traveling more-or-less generally in our direction, or else we would never see them. Nevertheless, most of them approach obliquely, not straight in to the shoreline. What happens then, believe it or not, is that the incoming wave “feels” the shore and turns to face it squarely before breaking. Later, when it breaks, the line of foam will be quite parallel to the shoreline.
The question, of course, is, how does a wave know when it is approaching a shore? And what makes it turn?
When a wave, consider it a broad bump on the surface, is still over deep water, there is nothing to restrain it; it goes wherever the wind commands. But as it moves into shallower water, the lower part of the wave begins to drag on the bottom, which slows it down. That’s its clue that it is approaching a shore, and that “knowledge” gives it a preferred direction.
Let’s say we’re riding a wave that is coming in at an angle, with the shoreline at our left. The first part of the wave to hit shallow water and scrape bottom will be the left end of the wave. The left end will therefore be slowed down, while the middle and right ends keep going at the same speed. This has the effect of turning the wave to the left, toward the shore.
If you drag your left foot from a go-cart, you’re going to swerve to the left, aren’t you? This dragging and slowing proceeds down the wave’s length from left to right as more and more of the wave feels the drag, and gradually the whole wave is turned to the left. Its crest line is now stretched out parallel to the shoreline, and that’s the position it finds itself in when it gets close enough onto the shore to break.
Waves break because of the same bottom-dragging effect. After the wave has lined up parallel to the shore, it eventually reaches such shallow water, and its bottom is slowed down so much, that its top overtakes its bottom and tumbles over it. The top falls with a crash, churning up a line of foam all along the wave’s length, and that’s parallel with the shoreline.
The next time you fly over a curving coastline, notice how the white lines of foam from the breaking waves are always parallel to the shore, no matter which way the shoreline turns.