The Antagonist of a story is the main force which opposes the protagonist. It can be anything; a force of nature, circumstance, a person, society in general, or even the protagonist him/herself. The antagonist, however, is never a main character, except when the antagonist is disguised as a main character or is a part of a main character. The antagonist can be part of a main character if said main character is having an internal struggle with him/herself.
Note that the antagonist is not necessarily every obstacle encountered by the protagonist; it is merely the main obstacle encountered by the protagonist.
The antagonist may be, but is not necessarily the same as, the villain.