The riddle
What Did the Ocean Say to the Beach?
A greeting with no words
Waves do the talking here. The ocean says nothing because it waves, and "wave" has two meanings: the gesture of a raised hand, and the moving ridge of water that rolls onto the shore. The question sets up a conversation, and the answer breaks it by turning the water into a person who greets with a hand and not a voice.
What really makes the waves
NOAA's National Ocean Service says the waves most people see are driven by wind, which pushes on the surface and passes some of its energy to the water. NOAA Ocean Exploration adds that waves carry energy and do not carry the water across the sea. Out in open water, the water itself mostly stays near its place while the wave moves through it.
Tides are another thing
The slow rise and fall of the sea is not a wave in this sense. NOAA's National Ocean Service explains that tides come from the gravitational pull of the moon and the sun. The riddle is about the quick, repeating waves, the ones that arrive at the beach again and again, which suits the picture of an ocean that waves over and over. The distance from one crest to the next is called the wavelength (Britannica, "wave").
Giving the beach a turn
The beach never answers, which is part of the charm. A group can play it as a two-person scene, with one player as the ocean and one as the beach, and the ocean waves instead of speaking. The scene works with no props, and a raised hand is all the answer needs.