It depends on the story. An anti-hero is against the hero in some way, but he isn't the main antagonist and might even be working against the main antagonist.
Shadow is more often depicted as an anti hero, but he was a villain for the majority of SA2.
But we're getting off topic. =P
I just have to clarify. Anti heroes are not against the heroes, they
are the heroes. Anti heros are when the "heroes" (central characters in a story/protagonists) satisy one or all of:
(1) lack conventional heroic qualities like idealism, courage, nobility, compassion, etc
(2) have imperfections that classic heroes don't have, like selfishness, self-loathing, etc
(3) have characteristic normally associated with villians, like greed, violence, hatred
(4) have possibly noble intentions but in which the ends justify the means
Examples: Magneto in the newest X-men movies, Severus Snape, Jack Sparrow, Catwoman, "V" in V for Vendetta
Edit: I should also mention that in many cases they will be doing good things but for selfish reasons. For most of the first Star Wars movie (Episode IV), Han Solo and Chewy are an anti heroes, compared to Luke and Ben who are classic heroes. Anti heroes are generally much more popular nowadays because they are "cooler" that way. Superman and Spiderman when they were first created were very clearly classic heroes, but efforts have been made to make them more anti hero like to stay relevant to modern tastes. End rant, sorry to get off topic.