Who It Is
The Ghost has the face and armor of the dead king, the father of Hamlet. It appears to the sentinels on the battlements, then to the son, and says it is held in torment until it purges its crimes. It reveals that it was killed by Claudius, who poured poison into its ear while it slept in the orchard, and asks for revenge. It also asks that Gertrude be spared. The play never resolves whether what the son sees is truly his father: Hamlet himself admits it may be a good spirit or a diabolical one.
Trajectory
In scene 1 of Act I, it appears twice, to the sentinels and to Horatio, and vanishes both times without answering, the second time when the cock crows. The first line of the play is the question the sentinel asks in the dark:
Who’s there?(I.1)
In scene 4 of Act I, it beckons to Hamlet and leads him away from his friends.
In scene 5 of Act I, alone with his son, it says it was killed by Claudius with poison in the orchard and that his brother seduced the queen, and asks for revenge without harm to Gertrude. When Hamlet makes his friends swear silence, the Ghost’s voice echoes from beneath the ground. In scene 4 of Act III, it reappears in the queen’s chamber, visible only to the son.