An anti-hero is a literary figure that, while the protagonist of a story, is not completely heroic. He conforms to some expectations of heroic figures but, in other ways, is reprehensible.
A classical hallmark of a hero may be their predilection toward brave acts, or bravery in general. An uncomplicated hero in Norse mythology is Beowulf. Beowulf slew the monster Grendal and saved many villagers. This interpretation of a hero is common and fits with most readers' expectations. An anti-hero, by contrast, has non-heroic qualities. For example, in the popular children's television program Scooby Doo, Scooby and Shaggy are cowards--seemingly afraid of their own shadows--yet capable of solving mysteries. Their cowardice is antithetical to most readers, yet readers will identify with them for other reasons (their humanity, possibly.) Without Scooby and Shaggy, mysteries on the program could not be solved and thus their position as co-protagonists is secured.
The purpose of an anti-heroic character is often to cause a reader or audience member to feel a conflict about supporting the protagonist's goals. Many of actor Clint Eastwood's early roles in Sergio Leone's films, as the "character with no name" were focussed on the narrative of an anti-hero. Eastwood's character would sometimes ignore an opportunity to help someone in need if he didn't feel like it, or act in some way that called attention to his character's moral ambiguity. In "higher" arts the conflict can be used to pull the reader or audience member into deeper consideration of the issues presented by the work. The problem of evil and the sovereignty of God is much more forcefully brought home by Milton's Paradise Lost because of Milton's treatment of the character of Satan. In the poem the quintessentially evil character is given a heroic treatment. The conflict created in the reader's mind turns the poem from a straight forward moral tale to an intellectually (and, perhaps, spiritually) stimulating work.
A well-known example of an anti-hero is the character V from V for Vendetta. V's heroism stems from his love of liberty and his determination to secure it, yet V seeks to to secure liberty by terrorist means. Here the anti-hero character turns what is superficially a straightforward comic-book adventure into a film that tempts the viewer to reconsider and more sharply define his or her attitude to force.
The traditional protagonist, the hero.