The word wave has many different meanings, but they all have to do with an undulating motion or shape. A wave that washes up on a beach has the same kind of back-and-forth movement as a crowd of baseball fans doing "the wave" in the stands.
Use the verb wave to describe a greeting that includes a hand motion, from the enthusiastic flapping wave of a little kid meeting his dad at the airport to the prim wave of a Queen acknowledging her subjects. In physics, when you talk about a sound wave, there is a similar kind of rise and fall. Two Old English root words of wave are wæfre, "wavering or restless," and wagian, "to move to and fro."