Any wave that reaches the shore must be travelling towards that shore, at least at an angle, or it obviously cannot get there. The deeper the water the faster the wave travels; this happens to follow from the physics of water waves. (This is why tsumanis travel hundreds of km/h over deep ocean, but slow down (and accordingly build up) as they approach major bodies of land).
Imagine a wave approaching a sloping beach at an angle of say 45 degrees. As it begins to mount the slope several kilometres out, the end nearest to land begins to slow down so that both the moving wave behind it and its neighbouring wave further out gain on it. The overtaking part of the wave causes the water to pile up higher, eventually causing the wave to form surf and break, whereas the neighbouring part of the wave begins to overtake, causing the wavefront to swing round towards land.
Eventually you have surf pretty well aligned with the shore. If the shore is in fact very steep, the effect is not so marked, and you get short, steep surf breaking on rocks, without being so neatly aligned.
Such spots make for lousy surfing and dangerous rock angling or bait hunting.
Avoid them!
As for the influence of the wind, that is more subtle. Firstly, except for extreme cases such as hurricanes scalping tall waves, or storms tearing spindrift from surf, wind creates waves gradually because it does not couple efficiently with the water; for the most part it skips over the top, leaving only a small fraction of its energy in the form, first of ripples, then of amplification or of damping of existing waves. Roughly speaking, steady blowing amplifies waves with a resultant direction favoured by the wind, and damps waves that oppose the direction of the wind. These effects are mainly of importance when there is a prevailing wind. Transient winds seldom affect wave patterns much.
However, wind does little to steer waves, largely because most wave fronts that the wind has much to do with are roughly straight. Steady winds tend to affect a straight wave equally along its whole front, so that there is no tendency to change direction, in contast to the steering effect of sloping beaches.
In short, transient winds hardly count, whereas prevailing winds favour and sort waves, but hardly steer them.
So pardon me as I blow on.
Jon