What is the meaning of Ahoy?

Used to hail a ship, a boat or a person, or to attract attention.

Warning of something approaching or impending.

To hail with a cry of "ahoy".

An utterance of this interjection.

Source: wiktionary.org