Deceit really drives the plot in Hamlet. The circumstance which generates all further conflict is that Claudius has secretly killed his own brother (and Hamlet's father), which Hamlet's father's ghost conveys to him in act 1. Because of this initial deceit, a tide of deceit follows:
Hamlet feigns madness in order to stall and consider his options for revenge.
Rosencrantz and Guildenstern, once school acquaintances of Hamlet, work with Claudius to deceive Hamlet regarding their loyalty. Their true motive is to assess his state of mind, not to lend support.
Polonius attempts to deceive Hamlet as he spies on a (heated) conversation Hamlet has with his mother. Unfortunately for him, Hamlet realizes that hidden ears are listening, assumes that it is Claudius, and is moved to act on his feelings of revenge—actually accidentally killing Polonius.
Ophelia is played as a pawn by most men in the story, asked to spy for them and to behave in ways that suit their purposes.
Shakespeare crafts the character of Hamlet by using cleverly deceptive puns and wordplay. In the very beginning scenes, Hamlet says of Claudius, "A little more than kin, and less than kind" (1.2.65). Claudius is now both his uncle and his father in law—but not necessarily a kind man or Hamlet's kind of man. When speaking about Claudius to his mother, Hamlet says, "You are the queen, your husband's brother's wife" (3.4.15). Hamlet presents a full logical circle here. Which husband? Which brother? The ability to craft Hamlet's character in this way to showcase the theme of deceit is a testament to Shakespeare's great talents.
Because of deceit, there is great loss of life by the end of the play. Claudius, Gertrude, Laertes, Polonius, Rosencrantz, Guildenstern, and Hamlet himself all meet an untimely end because they choose deceit over truth. The final scenes serve as a reminder that the effects of deceit can be far-reaching, impacting even the innocent (represented by Ophelia).