The word "wave" in the first sentence functions as the verb of the subject "she" and it means "to move one's hand in the air in order to attract attention or as a greeting" because it is followed by "goodbye" in second sentence, the word "wave" function as the noun because it is modified with "the" and it is identified by the word "beach". So it means "a moving ridge of water,caused by the wind and tide".