An Anti-Villain is the opposite of an Anti-Hero — a character with heroic goals, personality traits, and/or virtues who is ultimately the villain. Their desired ends are often good, but their means of getting there range from evil to undesirable. Alternatively, their goals can be purely selfish, but they retain a sense of morality that puts them at odds with other villains in the story.
They often reach a kind of critical mass that makes them more good than normal villains but not quite heroes, blurring the line between hero and villain the same way an Anti-Hero does, but coming from the opposite direction.
Anti-Villain is an attempt to lighten up a villain as opposed to an Anti-Hero, which has a tendency to darken the hero. Side by side, it can become very hard to tell them apart. The only reason some would even be considered evil at all is when they're the Designated Villain. Despite this humanizing characterization, they are rarely less dangerous. For instance, heroes wouldn't know what to expect if their enemy shows caring and then attacks their reputation, without giving them an excuse to rationalize killing them.
Many of them are probably well aware that what they're doing is "evil", unlike the blinded Knight Templar, but strive to maintain a façade of good PR, often by engaging in Pragmatic Villainy. They'll see it as a viable means to a (possibly) good end.
In terms of personality, anti-villains can be polite, caring and honorable in nature, even towards their enemies, but they may conversely treat their own allies with rudeness, which by its own accord, is a very unusual trait to possess. Moreover, compared to regular villains that are just simply evil, anti-villains are often neutral — depending on the writers of said characters. Those that are part of the neutral alignments however, aren't exactly benevolent, but they aren't malevolent either. Some examples may still end up closer to an evil alignment, even after possessing most of the sympathetic qualities associated with an anti-villain. But they can also be capable of a Heel–Face Turn much more easily than normal villains thanks to their personalities.