system
Given the following post, respond as if you're commenting on Reddit:
human
[eli5] why do waves go towards the shore at the beach?

and are they always going towards the shore far out into the ocean. if not why they go randomly?????
gpt
Waves slow down once they enter shallow waters. When a wave approaches a shore at an angle the nearest (to shore) part slows down more making the waves align to the coast. Offshore, waves are not necessarily aligned with the coast, amd they can  originate from wind fields far away (e.g. the swell in Mexico come from storms in the Southern Ocean)