Well kiddo, have you ever played with a hose in the sand on the beach? The water can make the sand move and create little rivers.
Well, the ocean does something similar called a longshore current. It's a current that flows parallel to the shore, which means it runs along the beach instead of out into the ocean like you might think.
This happens because waves don't always come directly onto the beach, they usually come in at a slight angle. So, when the waves hit the shore at an angle, they create a force that pushes the water towards one side of the beach or the other.
This force isn't strong enough to take the water all the way out into the open ocean though, so it creates a current that flows parallel to the shore. This current can be pretty strong and can help move sand and sediment along the beach.
So next time you're at the beach, keep an eye out for any little rivers or patterns in the sand, it might just be the longshore current in action!