To "wave to" someone means to shake your hand back and forth to say "hello":
Is that guy waving to you?
You can also "wave at" someone. "Waving at" someone has a little bit broader meaning. It can mean waving to somoene to mean "hello", "goodbye", or other meanings as well.