A villain (also known as a "black hat" or "bad guy"; the feminine form is villainess) is a stock character, whether based on a historical narrative or one of literary fiction. Random House Unabridged Dictionary defines such a character as "a cruelly malicious person who is involved in or devoted to wickedness or crime; scoundrel; or a character in a play, novel, or the like, who constitutes an important evil agency in the plot". The antonym of a villain is a hero.
The villain's structural purpose is to serve as the opposition of the hero character and their motives or evil actions drive a plot along. In contrast to the hero, who is defined by feats of ingenuity and bravery and the pursuit of justice and the greater good, a villain is often defined by their acts of selfishness, evilness, arrogance, cruelty, and cunning, displaying immoral behavior that can oppose or pervert justice.
The term villain first came into English from the Anglo-French and Old French vilain, which is further derived from the Late Latin word villanus, which referred to those bound to the soil of the Villa and worked on an equivalent of a plantation in Late Antiquity, in Italy or Gaul.[page needed]
Vilain later shifted to villein, which referred to a person of a less than knightly status, implying a lack of chivalry and politeness. All actions that were unchivalrous or evil (such as treachery or rape) eventually fell under the identity of belonging to a villain in the modern sense of the word. Additionally, villein became used as a term of abuse and eventually took on its modern meaning.
The landed aristocracy of Middle Age Europe used politically and linguistically the Middle English descendant of villanus meaning "villager" (styled as vilain or vilein) with the meaning "a person of uncouth mind and manners." As the common equating of manners with morals gained in strength and currency, the connotations worsened, so that the modern word villain is no unpolished villager, but is instead (among other things) a deliberate scoundrel or criminal.
At the very same time the medieval expression "vilein" or "vilain" is closely influenced by the word ´vile´, referring to something wicked or worthless. From late XIII Century Vile meant "morally repugnant; morally flawed, corrupt, wicked; of no value; of inferior quality; disgusting, foul, ugly; degrading, humiliating; of low estate, without worldly honor or esteem," from Anglo-French ville, Old French vil " from Latin vilis "cheap, worthless, of low value,"  Although the relation of these terms became intertwined at some later in time, it is unknown when this happened.
In classical literature, the villain character is not always the same as those that appear in modern and postmodern incarnations, as the lines of morality are often blurred to imply a sense of ambiguity or affected by historical context and cultural ideas. Often the delineation of heroes and villains in this literature is left unclear.
William Shakespeare modelled the villain archetype to be three-dimensional in characteristics and gave way to the complex nature that villains showcase in modern literature. However, Shakespeare's incarnations of historical figures were influenced by the propaganda pieces coming from Tudor sources, and his works often showed this bias and discredited their reputation. For example, Shakespeare famously portrayed Richard III as a hideous monster who destroyed his family out of spite.
In an analysis of Russian fairy tales, Vladimir Propp concluded that the majority of stories had only eight "dramatis personae", one being the villain.: 79 This analysis has been widely applied to non-Russian tales. The actions that fell into a villain's sphere were:
When a character displays these traits, it is not necessarily tropes specific to the fairy tale genre, but it does imply that the one who performs certain acts to be the villain. The villain, therefore, can appear twice in a story to fulfill certain roles: once in the opening of the story, and a second time as the person sought out by the hero.: 84
When a character has only performed actions or displayed traits that coincide with Vladimir Propp's analysis, that character can be identified as a pure villain. Folklore and fairy tale villains can also play a myriad of roles that can influence or drive a story forward. In fairy tales villains can perform an influential role; for example, a witch who fought the hero and ran away, and who lets the hero follow her, is also performing the task of "guidance" and thus acting as a helper.: 81
Propp also proposed another two archetypes of the villain's role within the narrative, in which they can portray themselves as villainous in a more general sense. The first is the false hero: This character is always villainous, presenting a false claim to be the hero that must be rebutted for the happy ending.: 60 Examples of characters who display this trait, and interfere with the success of a tale's hero, are the Ugly Stepsisters in Cinderella who chopped off parts of their feet to fit in the shoe.
Another role for the villain would be the dispatcher, who sends the hero on their quest. At the beginning of the story, their request may appear benevolent or innocent, but the dispatcher's real intentions might be to send the hero on a journey in the hopes of being rid of them.: 77
The roles and influences that villains can have over a narrative can also be transferred over to other characters – to continue their role in the narrative through another character. The legacy of the villain is often transferred through that of bloodlines (family) or a devoted follower. For example, if a dragon played the role of a villain but was killed by the hero, another character (such as the dragon's sister) might take on the legacy of the previous villain and pursue the hero out of revenge.: 81
The fairy tale genre utilises villains as key components to push the narrative forward and influence the hero's journey. These, while not as rounded as those that appear in other forms of literature, are what is known as archetypes. The archetypal villain is a common occurrence within the genre and come under different categories that have different influences on the protagonist and the narrative.
The false donor is a villain who utilises trickery to achieve their ends. Often the false donor will pose as a benevolent figure or influence on the protagonist (or those associated with them) to present them with a deal. The deal will present a short-term solution or benefit for whoever accepts it and, in return, benefit the villain in the long term. During the story's climax, the hero often has to find a way to rectify the agreement in order to defeat the villain or achieve the happy ending.
Similarly, the devil archetype is one that also makes an offer to the protagonist (or someone associated with them) and appeals to their needs and desires. However, the devil archetype does not hide their intentions from the protagonist. The subsequent story often follows the protagonist's journey to try and annul the agreement before any damage can be done.
The beast is a character who relies on their instincts and ability to cause destruction to achieve their ends. The evil intentions of their actions are often easily identified, as they act without concern for others (or their wellbeing) or subtlety. The rampaging villain can take the form of a very powerful individual or a rampaging beast but is still one of the more dangerous villain archetypes due to their affinity for destruction.
The authority figure is one that has already attained a level of command and power but always craves more. They are often driven by their desire for material wealth, distinguished stature or great power and appear as a monarch, corporate climber or other powerful individual. Their end goal is often the total domination of their corporation, nation, or world through mystical means or political manipulation. Often this villain is defeated by their own greed, pride, or arrogance.
The traitor is a villain who emphasizes the traits of trickery, manipulation and deception to achieve their goals, which is often to offer or supply information to the protagonist's opposition to halt them on their journey; often in exchange for their own freedom or safety. The traitor's goals are not always evil but the actions they commit to reach their goal can be considered inherently evil.
Villains in fiction commonly function in the dual role of adversary and foil to a story's heroes. In their role as an adversary, the villain serves as an obstacle the hero must struggle to overcome. In their role as a foil, they exemplify characteristics that are diametrically opposed to those of the hero, creating a contrast distinguishing heroic traits from villainous ones.
Other have pointed out that many acts of villains have a hint of wish-fulfillment, which makes some readers or viewers identify with them as characters more strongly than with the heroes. Because of this, a convincing villain must be given a characterization that provides a motive for doing wrong, as well as being a worthy adversary to the hero. As put by film critic Roger Ebert: "Each film is only as good as its villain. Since the heroes and the gimmicks tend to repeat from film to film, only a great villain can transform a good try into a triumph."
The term villain is the universal term for characters who pose as catalysts for certain ideals that readers or observers find immoral, but the term "villainess" is often used to highlight specific traits that come with their female identity—separating them, in some aspects, from their male counterparts. The use of the female villain (or villainess) is often to highlight the traits that come specifically with the character and the abilities they possess that are exclusive to them. For example, one of the female villain's greatest weapons is her alluring beauty. The perversion of inherently female traits in storytelling also alludes to the demonic display of the succubus and their affinity for utilising their beauty as a weapon—a trait utilised by many female villains throughout modern fiction and mythology.
The ethical dimension of history poses the problem of judging those that acted in the past. It, at times, tempts us scholars and historians to construct a world of black and white: in which the terms of hero and villain are used arbitrary and with the pass of time become interchangeble. These binaries of course are reflected to varying degrees in endless movies, novels, and other fictional and non-fictional narratives.
As processes of globalization connect the world, cultures with different historical trajectories and political traditions will need to find ways to work together not only economically, but also politically. In this evolving framework of globalization, tradition, according to political theorists like Edmund Burke Through the embellishment of history into tradition, historical figures perceived and evaluated as either positive or negative become embodiments of national political cultures that may collude or collide against one another. 
The usage of villain to describe a historical figure dates back to Tudor propaganda, pieces of which ended up influencing William Shakespeare's portrayal of Richard III as a spiteful and hunchback dictator.
The sympathetic villain or anti-villain is one with the typical traits of a villainous character but differs in their motivations. Their intentions to cause chaos or commit evil actions is driven by an ambiguous motivation or is not driven by an intent to cause evil. Their intentions may coincide with the ideals of a greater good, or even a desire to make the world a better place, but their actions are inherently evil in nature. An anti-villain is the opposite of an anti-hero. While the anti-hero often fights on the side of good, but with questionable or selfish motives, the anti-villain plays a villain's game, but for a noble cause in a way that the audience or other characters can sympathize with. They may be more noble or heroic than an anti-hero, but the means to achieve their ends are often considered exploitative, immoral, unjust, or simply evil. Characters who fall into this category are often created with the intention of humanizing them, making them more relatable to the reader/viewer by posing the "how" and "why" behind their motivations rather than simply creating a one-dimensional character. Because of their motives, many of these types of villains are commonly nicknamed as "anti-villains".
American writer Brad Warner has argued that "only cartoon villains cackle with glee while rubbing their hands together and dream of ruling the world in the name of all that is wicked and bad". American writer Ben Bova recommends to writers that their works not contain villains. He states, in his Tips for writers:
"In the real world there are no villains. No one actually sets out to do evil ... Fiction mirrors life. Or, more accurately, fiction serves as a lens to focus on what they know in life and bring its realities into sharper, clearer understanding for us. There are no villains cackling and rubbing their hands in glee as they contemplate their evil deeds. There are only people with problems, struggling to solve them."
Following up on Bova's point, American writer David Lubar adds: "This is a brilliant observation that has served me well in all my writing. ... The bad guy isn't doing bad stuff so he can rub his hands together and snarl. He may be driven by greed, neuroses, or the conviction that his cause is just, but he's driven by something, not unlike the things that drive a hero."