|art by Robert Fyfe|
Villains are the characters in your book that your readers love to hate. Your antagonist stands between your protagonost and what they want. Villains can be the main opposition to your protagonist or they can also be a supporting character who causes extra conflict and difficulties for your main character.
Some stories have villains that are simply one dimensional with no redeeming qualities. For example, in the Harry Potter series, Voldemort's only positive trait is his intelligence, and even that he uses for malevolent purposes. He has no remorse for his actions, no love for any of his fellow wizards or for humans and, even his followers are not safe from him. There is nothing redeeming about him, and readers of Harry Potter love to hate him. He is a great foil for Harry Potter.
But your villain can't be one dimensional. To the reader, your villain has to be real, and real people or creatures have a past, even if it's not discussed within the confines of the book. They have reasons for being the way that they are. Voldemort has an innate hatred for humans, and, as he calls them, muggles. Perhaps this is caused by his upbringing in an orphanage or perhaps, he was just born bad. The reader is shown glimpses of his years as a student at Hogwarts, showing that he was scheming and had bad intentions from very early on.
In contrast, the character of Snape in Harry Potter is a different type of villain, one who becomes redeemed by the end of the series. This is an example of another type of villain in a story; some stories have villains who have redeeming qualities but choose to act against them. Snape is an exception in that, despite his antagonistic behavior towards the main character, he is actually acting to keep Harry Potter safe. His main redeeming quality is his love for Harry Potter's mother and his loyalty to that love.
A better example of a villain with redeeming qualities would be Loki in Marvel's Thor and Avengers movies. He starts out as a younger brother who fights by his older brother's side. It becomes clear, as the story goes on, that he is jealous of his brother, and, there are instances where the viewer gets to see, in the midst of his villainous actions, that he is really acting out in a desperate attempt to gain his parents' approval and love. The love they show him isn't enough, because he has always felt that they loved his brother more. He's a rebellious child, but he still has redeemable qualities that make the viewer wonder if he can ever be redeemed. In fact, at one point, he helps his brother Thor save the woman he loves, but he then uses his assistance as a way to escape and the viewer is left, again, wondering which side Loki will fall on years down the road, and if future experiences of his will change him for the better or for the worse.
A villain with redeeming qualities always leaves the question in the reader's mind of whether or not he will be redeemed. It leaves the reader with just enough hope to wonder, but not enough to ever root for him over the protagonist.