How does waves deposit?

The waves carry particles and are dumped on shore. Waves can form beaches and sand bars