How does refraction cause wave crests to move when the waves approach the shore?

How does refraction cause wave crests to move when the waves approach the shore?