|Picture Credit: http://villains.wikia.com/wiki/Main_Page|
|Picture Credit: http://scriptshadow.blogspot.com/2012/09/|
Get in the villain's head
Think of the effective villains you have read about, watched in movies, or studied in history. These villains have depth and, if asked, would tell you they are the "good guys." They believe (or at least have convinced themselves) that they aren't really doing anything wrong. They would always tell you that their actions are justified.
This is true whether you are talking about the definite villain of a story, or if you are simply talking about a secondary character that your main character can not get along with.
|Picture Credit: http://www.torontosun.com/2012/10/23/the-|
Now do the same with a villain that you are writing. Is it easier or harder? Do you run into a wall where your villain only functions in a way that will hurt the main character for the sake of the story? If so, your villain is suspiciously like the cartoon character depicted at the top of this blog. Now, if you want your story to be punchy and light, you might be on the right track. But if you want a realistic villain, you need to give him or her more. Every villain must think and act as though he or she is the main character. There should not technically be a "bad guy."
|Picture Credit: http://bleacherreport.com/articles/393442-|
Give the villain a moral code
If you want people to be able to relate to your villain, try figuring out and somehow showing his or her moral code. Obviously, villains don't function with high morals on every desirable subject, but one or two redeeming features will make the villain more realistic. Your character may be a psychopath killer, but maybe he or she is absolutely loyal to that one friend from childhood.
Know the backstory
My last piece of advice on creating a villain that will stick with people, is to give the villain a back story. This is going to be a major part in why he or she is a villain today. Now, you have to be careful here because a secondary character's back story really can't take up pages and detract from the here-and-now. But if you can find ways to add tidbits from the villains past at times when it will add to the story, you will find that you have created a villain that everyone loves and hates at the same time.