One of the most disappointing things about reading a book or watching a television show is when the villain has no depth to their character. The most apt examples I can think of are the westerns or police procedurals from the 1960s, where the bad guy does amoral and/or illegal acts simply because he/she is insane.
They never tried to explain how the villain was insane. Was it an anti-social personality disorder? Multiple personalities? A superiority complex with violent tendencies? Nope, the explanation always stopped short at one word: crazy.
While I will acknowledge that people read stories to get away from their normal lives, the plot still needs to make some sense. For those who appreciate a good mystery novel, 'crazy' is a good start on motive for the villain, but it needs to be explained with some debate about nature versus nurture, a macabre backstory, or a shared history with the main character/hero/heroine.
How can you avoid writing this overused stock character as the villain of your piece? Here's my advice:
1. Villains are people too - It sounds silly, but try to think of your bad guy(s) in more than one dimension. Villains have good traits as well as faults, so while the story may require that you emphasis the faults, don't forget the puppy that your villain rescued from the pound, or that they give blood a few times a year. Just because they are the foil to your main character doesn't mean they need to be evil to everyone all of the time.
2. Villains commit villainy for a reason - Villains have a reason for their actions. We hear the reasons ad nauseum in various stories' monologues, but the reasons are there nonetheless. If your villain is a businessman, show the meeting where he/she is arguing for polluting the Everglades because it's kinder than dumping toxic waste into a hospital's water supply. Or, have the scene where the villain snaps at an aide because they just finished a stressful business call. Without reason, your villain cannot justify (or rationalize) their actions.
3. Villains aren't perfect - This is an important fact to keep in mind, especially if you want the villain to lose. In keeping with the 'villains are people' point, villains have fears and insecurities just like the heroes in your writing. However, the villains probably do a better job of hiding those fears and insecurities, which means that the heroes have some investigation to do before they can achieve their victory.
Who knows, maybe in the process of all that investigating, the hero will discover that he and the villain have more in common than they first thought. That could lead your story down one of two paths: A. If they aren't so different, maybe they can be allies instead of enemies. Or (more likely), B. The hero will simply feel really bad about having to stop the villain in the end.