In Act I, scene iv of Hamlet, Hamlet encounters what appears to be his late father's ghost for the first time. The other characters in this scene are Horatio and Marcellus.
First of all, this scene highlights the theme of corruption in Denmark under the rule of Claudius: "This heavy-headed revel east and west makes us traduced and tax'd of other nations: they clepe us drunkards . . ." (lines 17-19). With Claudius as king, Denmark has become known for late night partying and drinking rather than the proud nation it once was when Hamlet's father was king. Because of this corruption, this scene foreshadows the necessity for Hamlet to take some type of action against Claudius. Unfortunately, Hamlet's inability to take decisive action leads to tragic consequences.
Also, when the Ghost appears, the mood shifts to one of mystery and doubt. Hamlet states:
". . . What may this mean,
That thou, dead corse, again in complete steel
Revisit'st thus the glimpses of the moon,
Making night hideous . . ." (lines 51-54).
Hamlet questions the appearance of the Ghost, the corpse of his late father, wondering just how this apparition could appear dressed in full armor. This incident foreshadows the influence the Ghost will have over Hamlet in the following scenes.
Lastly, this scene is important as it foreshadows the theme of Hamlet's madness that is developed throughout the play. As Hamlet leaves to follow the Ghost, Horatio states: "He [Hamlet] waxes desperate with imagination (line 87). From the onset, Hamlet is entranced by the Ghost. Even more importantly at the end of the scene, Marcellus states: "Something is rotten in the state of Denmark" (line 90). This statement highlights the current dreadful situation in the country foreshadowing the tragic events to come.