In Shakespeare's Hamlet, the theme of appearance vs. reality occurs several times.
The most striking example of this may be Hamlet's "insanity." While this point is strongly debated (is Hamlet truly insane or pretending), his plan to act crazy gives him freedom (without suspicion) to prove what the Ghost has told him: that Claudius murdered Old Hamlet. In Act One, Hamlet says he will act crazy, and swears Horatio and the others that no matter how he acts, they will not give Hamlet away by a knowing nod, a wink or a casual comment.
Here, as before, never, so help you mercy,
How strange or odd soe'er I bear myself—
As I perchance hereafter shall think meet
To put an antic disposition on— (I.v.189-192)
Appearance vs. reality is seen in the Ghost. Elizabethans were believers in the powers of evil, certain that witches and ghosts could serve a dark purpose. Hamlet's reticence to act quickly after the Ghost reveals Claudius' murder of Old Hamlet is seated in the Elizabethans' worry that the powers of darkness would do anything to win a man's soul. Hamlet worries that the Ghost may give the appearance of his dead father, only to trick him into murdering the King. Regicide was considered a mortal sin. For in The Great Chain of Being, Elizabethans believed that God ordained where a man's place in life (his importance) would be. To kill a king was an act—against God. So while Hamlet says that the Ghost is an "honest" one, his desire for proof (for the sake of his soul) is necessary. After all, the Ghost has also reported that he (Old Hamlet) went to his death without the benefit of absolution, and now must walk the earth, tormented in purgatory. (Hamlet would not want this for himself.)
When Hamlet finally gets Claudius to show his guilt at the reenactment of Old Hamlet's murder (in the play, Mousetrap), Hamlet finally has his proof. The King sees the murder and abruptly rises. Hamlet is gleeful—Claudius responds to a pretended act...for this is only a play, Hamlet says...right? (With this theme, the appearance of the murder of a king alludes to the reality of such an action.)
What, frighted with false fire? (III.ii.255)
Hamlet seems to have struck a nerve when the King ends the play:
Give me some light. Away! (258)
After the fiasco of the play, Claudius retires to the chapel to pray. Hamlet comes upon him, planning to kill him, but stops: for if Claudius confesses his sins, he goes straight to Heaven, while Old Hamlet is cursed to walk for a time to suffer for his sins. The appearance vs. reality is that Claudius cannot pray (though Hamlet doesn't know it):
O, my offence is rank, it smells to heaven;
It hath the primal eldest curse upon't,
A brother's murder! Pray can I not,
Though inclination be as sharp as will;
My stronger guilt defeats my strong intent...(III.iii.37-42)
Polonius hides behind the curtain in Gertrude's room to spy. Hamlet believes Claudius is there, in the midst of an incestuous act with Gertrude (for who else but husband would be there), and Hamlet kills the old man.
How now, a rat? [Draws.] Dead for a ducat, dead! (III.iv.26)
It appears to be the King, but in reality, it is the nosey Polonius.
The theme is even attributed to Gertrude: is she guilty of collusion in her husband's death? The Ghost speaks of...
...The will of my most seeming-virtuous queen. (I.v.51)
Hamlet will discover later that she is innocent, but appearances (again) might be deceiving.