A primary meaning of harbinger is a person who announces or declares the arrival of one or more people. During war time, a harbinger is someone sent ahead to finding lodging for troops. A harbinger is also an occurrence that foreshadows an important event.
An example of a person acting as a harbinger is in the sentence, "The family was concerned about John showing up unexpectedly, so Tom played sat out front to play the harbinger of his arrival." An example of the term used to describe foreshadowing is, "The sudden rain cloud was a harbinger of trouble ahead for the party."