Antagonists come in many forms: natural disasters, well-meaning friends, or even unwitting coincidence. But I think the most fun to write are villains.
Project Mayhem has posted some great material about villainy in the past, but I thought I'd revisit the subject with some ideas that have been helpful to me lately.
Many many types of villains have been identified before. But I've noticed lately that there are often three levels of villains that come up within the same novel, especially those with young protagonists. So let's break them down and look at their roles, functions, and pitfalls.
What they are: Rivals are someone on the same level, or close to it, with the protagonist. They may only serve to drive the protagonist forward as a competitor who poses a true challenge, or they may become a bully who actively causes harm. Rivals are not typically the main threat. They are usually unrelated to the true villain of the story; however, they may be conscripted to become an agent of the greater enemy, or used as a pawn. They may also be somehow redeemed before the end, often as a result of their encounters with the protagonist.
Examples: Draco Malfoy (Harry Potter), Josie Pie (Anne of Green Gables), Boromir (Fellowship of the Ring), Edmund (The Lion, the Witch, and the Wardrobe), Marion Hawthorne (Harriet the Spy)
Function: The Rival creates situations that test the protagonist, calling out and revealing their strengths, weaknesses, and true character. They also serve as a foil to the protagonist, so that readers become more invested in the main character through seeing their virtues in contrast to the Rival's character flaws. They are a training ground for the climactic confrontation with the greater enemy and create try/fail cycles to track the protagonist's progress. In reality-based fiction, the Rival may be the only intentional human antagonist.
Pitfalls: Like all villains, Rivals need to have a good reason in their own minds for treating our protagonist the way they do. Just being a spoiled brat or the next best competition isn't enough for them to single out the protagonist. Get inside their head and figure out what pressures, insecurities, and prejudices make them the way that they are. Frenemies, former friends, or family members can make for a much more complex kind of Rival who has both love and hatred at play in how they relate to the protagonist.
What they are: Agents are tools used by the true enemy to do their evil work. Often they are secret Agents, posing as allies but actually working against the protagonist. Sometimes they are overtly acting as a representative of a greater evil but are clearly motivated by lesser impulses and desires, which can allow for crueler and pettier torments for the protagonist. Sometimes they are corrupted or possessed by evil, or they may be a henchman. Often Agents are in positions of power or inherent trust, which lends to more surprising revelations and to abuses of that power, amplifying the largeness of the overall threat.
Examples: Wormtail/ Peter Pettigrew (Harry Potter), Barty Crouch Jr./ Mad-Eye Moody (Harry Potter), Professor Quirrel (Harry Potter), Luke (Percy Jackson: The Lightning Thief), Saruman (Lord of the Rings), Darth Vader (Star Wars)
Function: Agent villains allow for layers of complexity to the greatest source of antagonism in a novel. They create good plot twists when their motives and loyalties are revealed. They give the reader a sense of the pervasiveness of the evil and the immensity of what the protagonist has to overcome. Agents are often the more interesting villains because their ability to deceive about their true motives gives the reader both good and bad interpretations of their character, heightening the horror of what seemingly good people are capable of.
Pitfalls: Again, this type of villain needs a strong personal reason for doing what they do. They may believe in the cause of the true enemy, or they may be acting under duress, but their willingness to be used as an Agent has to have that additional personal motivation based on past experiences, beliefs, and circumstances. It can be tricky to keep a secret Agent disguised from your reader while finding that balance of giving them believable flaws, a compelling motivation for what they're doing, and some well-hidden hints before the reveal. Likewise, a too-perfect Agent will automatically be suspect.
What it is: This is the mastermind, entity, Dark Lord, or true source of evil who will pose the greatest threat to the protagonist, which they must overcome. These are the more traditional villains.
Examples: Sauron (Lord of the Rings), Voldy (Harry Potter), The White Witch (The Lion, the Witch, and the Wardrobe), The Emperor (Star Wars), Lex Luther (Superman), Kronos (Percy Jackson)
Function: The Enemy's main function is to pose the greatest threat and bring the protagonist to their ultimate limits as they try to overcome that threat. They personify everything the protagonist must reject, and good Enemies actually do make clear the allure of their perspective, or offer such horrific consequences that the reader would understand why the protagonist would capitulate.
Pitfalls: One pitfall here is having only the central Enemy. As you can see from the above, layers of challenges with lesser villains better prepares the protagonist, and in turn the reader, for the final confrontation with the true Enemy. If you do layer in this way, though, you shouldn't just plunk in the Enemy at the end. Threads of the Enemy should be woven throughout the story, and the challenges the protagonist faces should relate in some manner to the ultimate challenge in the climax. Another major pitfall is to make the Enemy one-dimensional. Remember that every villain is a hero in their own eyes--they are a distortion of what goodness and heroism should be, not necessarily the total opposite of it. Understand why they do what they do.
I hope you find this as helpful as I have! Please let us know in the comments if you've noticed this hierarchy before, or if you think there might be other things to add to the levels of villainy. Now go practice your evil laugh.