A foil is a character in a story who contrasts with another character, usually the protagonist, to highlight particular qualities of the other character. This technique helps to enhance the audience's understanding of the main character by emphasizing their traits, motivations, and development through the use of juxtaposition. Foils can help illustrate themes and add depth to character interactions.