In a story, an antagonist is a character presented as the chief foe of the protagonist.
In the classic style of stories where the action consists of a hero fighting a villain, 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 is sometimes a neutral character who may represent a threat or obstacle to the main character by its existence, not necessarily by targeting him or her in a deliberate manner.
Antagonists are conventionally presented as making moral choices less savory than those of protagonists. This condition is often used by an author to create conflict within a story. This is merely a convention, however. An example in which this is reversed can be seen in the character Macduff from Macbeth, who is arguably morally correct in his desire to fight the tyrant Macbeth, the protagonist.
Examples from television include J.R. Ewing (Larry Hagman) from Dallas and Alexis Colby (Joan Collins) from Dynasty. Both became breakout characters used as a device to increase their shows' ratings.