When Hamlet and the Ghost are alone, the Ghost speaks. It claims to be the spirit of Old Hamlet, murdered by Claudius. Though the official story is that Old Hamlet was napping in his garden and was stung by a serpent, in reality Claudius poured poison into the sleeping man's ear, murdering him and sending him to Purgatory because he was not given a chance to confess his sins before he died.
The Ghost reveals reality. Also note that the way Claudius murdered Old Hamlet, by pouring poison into Old Hamlet's ear, is actually a wonderful metaphor for lying, for using language to hide reality.
The Ghost commands Hamlet to seek revenge against Claudius for murder and for corrupting Gertrude. Yet the Ghost also warns Hamlet not to harm his mother. Dawn breaks. The Ghost disappears.
Another command from a father. Another promise to obey.
Hamlet promises to do nothing but seek revenge. He curses first Gertrude, "O most pernicious woman!" (1.5.105), then Claudius, "That one may smile, and smile, and be a villain!" (1.5.108).
Hamlet promises to act, yet he curses his mother before Claudius. A "smiling villain" is an example of appearance vs. reality.
Horatio and Marcellus rush in. Hamlet refuses to tell them what happened, saying they'll reveal it. But he does say he may pretend to be insane, and makes them swear to silence on his sword. The Ghost's voice echoes: Swear! They swear.
As soon as reality is revealed, Hamlet hides behind mask of madness. But at times already he seems actually to be mad.
Hamlet despairs at the burden the Ghost has given him: "The time is out of joint. / O cursed spite! That ever I was born to set it right!" (1.5.189-190).
A few lines after promising to seek revenge, Hamlet is already cursing his fate.