In fiction, a foil is a character who contrasts with another character - usually the "protagonist— to highlight particular qualities of the other character. In some cases, a subplot can be used as a foil to the main plot. This is especially true in the case of "metafiction and the ""story within a story" motif. The word foil comes from the old practice of backing gems with foil to make them shine more brightly.
A foil usually either differs dramatically or is extremely similar but with a key difference setting them apart. The concept of a foil is also more widely applied to any comparison that is made to contrast a difference between two things. "Thomas F. Gieryn places these uses of literary foils into three categories, which Tamara A. P. Metze explains as: those that emphasize the heightened contrast (this is different because ...), those that operate by exclusion (this is not X because...), and those that assign blame ("due to the slow decision-making procedures of government...").
In The Snake in my Boot, the two characters fight to claim the snake. Through the pages, the reader will come to realize JM and MM are opposites.
Similarly, in "Shakespeare's play "Julius Caesar, the character Brutus has foils in the two characters Cassius and Mark Antony. Shakespeare commonly used foils in his plays. In the play "Romeo and Juliet, "Romeo and "Mercutio serve as character foils for one another, as well as "Macbeth and "Banquo in his play "Macbeth.
In "William Shakespeare's tragedy "Hamlet, a foil is created between "Laertes (Hamlet) and "Prince Hamlet to elaborate the differences between the two men. In Act V Scene 2, Prince Hamlet tells Laertes that he will "fence with him and states, "I'll be your "foil, Laertes" (5.2.272). This word play reveals the foil between Hamlet and Laertes, that was developed throughout the novel.
In the "Harry Potter series, "Draco Malfoy can be seen as a foil to the "Harry Potter character; "Professor Snape enables both characters "to experience the essential adventures of self-determination" but they make different choices; Harry chooses to oppose "Lord Voldemort and the Death Eaters, whereas Draco eventually joins them.
George and Lennie are foils to each other in John Steinbeck's "Of Mice and Men. Lennie is huge and strong as a bull but is also mentally slow, while on the other hand George is small, skinny and very smart.