An antagonist is a character, group of characters, institution, or concept that stands in or represents opposition against which the protagonist(s) must contend. In other words, an antagonist is a person or a group of people who opposes a protagonist.
The English word antagonist comes from the Greek ἀνταγωνιστής - antagonistēs , "opponent, competitor, villain, enemy, rival," which is derived from anti-("against") and agonizesthai ("to contend for a prize").
In the classic style of stories where the action consists of a hero fighting a villain/enemy, the two may be regarded as protagonist and antagonist, respectively. However, the villain of the story is not always the same as the antagonist, as some narratives cast the villain in the protagonist role, with the opposing hero as the antagonist.
An antagonist also may represent a threat or obstacle to the main character by its existence and not necessarily targeting him or her in a deliberate manner.
Examples in both film and theatre include Sauron, the main antagonist in The Lord of the Rings, who constantly battles the series' protagonists, and Tybalt, an antagonist in Romeo and Juliet, who slays Mercutio and whose later death results in the exiling of one of the play's protagonists, Romeo. In stories, a convention of antagonists is that their moral choices are less savory than those of protagonists. This is often used by an author to create conflict within a story. However, this is merely a convention, and the reversal of this can be seen in the character Macduff from Macbeth, who is arguably morally correct in his desire to fight the tyrant Macbeth.
An antagonist may be a sympathetic character who the audience identify with, such as Wile E. Coyote, who is unable to catch the Road Runner.