An antagonist is a character who opposes the protagonist. An antagonist can be wholly unsympathetic and evil, in which case they are a villain, or they can be more like an anti-hero, with sympathetic (if ultimately misguided) motives. Sometimes the antagonist isn't even a person: it can be something more abstract like the environment or the protagonist's inner demons.
Either way, the most important consideration when writing an antagonist is whether or not it provides a serious challenge to the protagonist. If the main characters can conquer the wilderness or bowl over the bad guys without breaking a sweat, it means their own author doesn't believe in them enough to set them an obstacle they must struggle to overcome. If that's the case, the readers won't believe in them, either.
It helps if the antagonist has read Peter's Evil Overlord List.