Refraction is the bending of the waves which is result of the fact that different parts of the wave reach the water with different speeds because of the angle approaching the shore.
The wave refraction disperses the wave energy in quiet water areas and sand is deposited.