This causes a drag on the wave such that it is slowed down and hence it's wave length is reduced. If a wave approaches a beach at an angle, the part closest to the beach is in shallower water and therefore travels slower than those further away so the whole wave front tends to be turned into the beach. This is known as shallow wave refraction. If this happens very gradually, by the time the wave reaches the beach, it will be parallel to it, regardless of its original orientation. Because long period waves will feel the bottom sooner, they are refracted at an earlier stage and therefore have a greater ability to get into the most sheltered bays.
Refraction also causes some areas to be more prone to bigger waves than others.
Often at a headland, waves are refracted towards the point and break along its side at a much bigger size than on the beach. Also, refraction on individual sand bars will cause the surf to break there at a bigger size than anywhere else. This makes for ideal surf conditions. As already stated, longer period waves travel fastest and therefore overtake shorter period ones. Also there may be several wave trains present that have come from different wave generating areas.