A common comic book foil, Anti heroes are an interesting take on the idea of hero. Heroes are, well heroic. Good to the downtrodden, genuinely nice people for the most part, willing to sacrifice themselves for the greater good, etc.
Obviously, that description is painfully specific, but works for the definition of heroes. Antiheroes, on the other hand, are decidedly not. These guys, folks like Wolverine out of the X-men, Deadpool, or Namor out of Marvel, are generally not very nice people. They do what they do because they feel like it, not necessarily because its just the right thing to do. They are mercenaries, selling their power for money or favors.
That by itself makes them really interesting characters. While heroes can be written to do no wrong, and are always correct, the writers of antiheroes are free to make their characters wrong, or lose. In this, many see antiheroes as more relatable. Superman, while he is fairly close to a comic book version of Jesus, isn’t very relatable: nobody is actually perfect.
Wolverine, on the other hand, is decidedly not perfect. He drinks, he smokes, he sleeps around, and is frighteningly good at killing people. While the vast majority of people in the world don’t kill people, many do drink, smoke, or sleep around. Wolverine actually has the potential to be a person you know. Maybe you don’t hang out with them very often, but most people know a cranky old war veteran.
One of the common characteristics of antiheroes, however, is their unflagging loyalty to those they choose. When everything goes sideways, and battle lines are drawn, you know for a fact that Wolverine is going to work with the X men, not the Brotherhood of Mutants.
The other common characteristic is one that really defines antiheroes- they are willing to do the nasty thing that other, more conventional heroes, aren’t. Generally, this is showcased as having a body count in general, but can be shown as willing to sacrifice innocents to complete an objective. As far as literature goes, this often gives a source of inner conflict to the hero- do they do the nasty thing his not so great friend suggested and get the cool thing? Or don’t, and not get the important thing, but keep your pride/code intact? Such a question is a common one to ask the character, but is a valuable source of character development. And can only really be pulled off when the protagonist has an antihero buddy.