Anti-heroes are largely assumed to be sympathetic vigilantes. Think Wolverine or The Punisher. That is certainly a type of anti-hero, but it's not the only one. There are three basic types of anti-heroes:
- The hero that fails
- The sympathetic vigilante
- The compelling, yet unheroic, unsympathetic protagonist
The first type is the hero that fails. This character portrays all the qualities of a traditional hero throughout most of the story, up until the end, where they fail. Think Frodo, and Anakin Skywalker.
The second type is the sympathetic vigilante, which is perhaps the most popular, like Wolverine or The Punisher. These are characters that often do terrible things, but usually to bad people. These are characters with an "any means necessary" approach to problem-solving.
The third type is the compelling, yet completely unheroic protagonist. These characters do not portray any qualities of a traditional hero. They are usually not strong, or smart, or brave and instead possess undesirable traits. Rosencrantz & Guildenstern are classical anti-heroes in that they have no heroic qualities, yet they pull you into the story and compel you to follow along. This third type is, in my opinion, the toughest to do well because everything works in opposition to your success.
It's important to note that anti-heroes are not sympathetic villains or redeemed villains. Those are different characters with their own qualities.