Character Role Analysis
Hamlet and Claudius
Does Hamlet want to kill his father and sleep with his mother? Maybe. If so, Claudius is a perfect foil for Hamlet, because Claudius does what Hamlet only thinks about doing: killing Hamlet Sr., and then marrying Gertrude. Some scholars even suggest that Hamlet delays so long in killing Claudius because he realizes Claudius is just like himself.
Even if you don't buy this theory, Hamlet and Claudius are foils in a more basic way. Hamlet hates deception; Claudius is really good at it. Hamlet values honesty and truthfulness and fidelity; Claudius is one of the biggest —and most successful —fakers ever. Claudius is good at politics and managing people; Hamlet doesn't seem to be very good at this at all. Claudius doesn't make a bad king, minus the brother-killing-thing; Hamlet may have actually made the worst king ever.
Hamlet and Fortinbras/ Laertes
Both Prince Fortinbras and Laertes are everything Hamlet is not. (We can hear the Ghost now: "Why can't you be more like Fortinbras, Hamlet? You're such a disappointment.") Both Fortinbras and Laertes also need to avenge their fathers, and they both take care of business in a big way: Fortinbras tries to wage a war against Denmark, while Laertes runs home from Paris to stage a revolution in his dead father's honor.
Even Hamlet himself refers to Laertes and Fortinbras as people he regards as, well, foils for himself. He has an entire soliloquy in Act IV, Scene iv in which he compares himself to Fortinbras and swears to be more like him: "Witness this army of such mass and charge/ Led by a delicate and tender prince,/ Whose spirit with divine ambition puff'd/ Makes mouths at the invisible event… O, from this time forth,/ My thoughts be bloody, or be nothing worth" (4.4.50-53; 68-69).
Well, everyone needs a goal.
Hamlet-Claudius-Gertrude and Ophelia-Polonius-Laertes
Hamlet's plot revolves around two families: Hamlet-Hamlet Sr./Claudius-Gertrude, and Ophelia-Polonius-Laertes. There are two sets of fathers (Hamlet Sr./Claudius and Polonius), and two sets of children (Hamlet and Laertes/Ophelia).
What we are trying to say here is that family #1 is a foil for family #2. The relationships between parents and their children are portrayed in two different ways: first, Hamlet's relationship to his father's ghost contrasts to Laertes's relationship with his father (lots of advice involved, the question of revenge), and second, Polonius's misunderstanding of Ophelia reflects Gertrude's misunderstanding of Hamlet. The parallels are by no means perfect, but the mirroring structure can raise questions about the universality of the kinds of relationships the play depicts. Doesn't everyone have a parent who misunderstands them? Doesn't everyone receive long-winded and occasionally embarrassing advice from his father?
Ophelia and Gertrude
There are only two women in the play: Hamlet's mother, Gertrude, and Hamlet's love interest, Ophelia. How convenient: a "virgin-whore" dichotomy to establish the two women as foils to each other. Ophelia is a maiden and an obedient daughter to Polonius; Gertrude (in the eyes of Hamlet, anyway) has a sexual "appetite" and "hasty" remarriage that mark her as promiscuous and unfaithful. Is that fair? Probably not. We only get Hamlet's perspective on Gertrude, and he's biased. What really makes these ladies foils is that they're both women who die because of the power machinations of men who control them.