Anti-hero is a term commonly given to a unheroic or morally questionable protagonist. It can also be applied to other characters in the story, but this is much rarer. An anti-hero is different from a villain in that they are generally more sympathetic to the reader and tend to be somewhat moral or neutral, rather than evil.
A typical anti-hero would be someone who does good but through harsh or brutal methods - a chaotic good character who believes the ends justify the means or who has little sympathy for villainous characters. The term may also be used for characters who generally act in their own self-interest, making few or no attempts to deliberately do good, but also not doing evil.
At times this term may also be used for characters that are otherwise irredeemable villains, but are the protagonist of the piece, as part of the definition of villain is often taken to be that they are not protagonists. Due to the extreme rarity of such characters, the terms for them are not yet standard.