Hi Vika! How have you been?
According to what I learned from my friends and relatives from the US, when you wave to someone, you are simply responding to a person who also waved to you. Now, waving at someone can have a broader meaning e.g, raising your hand as to signal recognition to someone.
Example: Ross waved at Rachel as soon as he went out of the airpot gates.
I hope this will do.