There exist certain rules that apply to villains in almost all stories. Whether your story is a western or a mystery these rules remain.
First, the villain must be powerful enough to threaten the hero. Without that power, the character is no longer a villain but merely an annoyance. The power can be physical, financial, political or psychological. Perhaps the villain could reveal a secret that would discredit the hero.
Second, the villain must be intelligent. What makes Moriarty such a great villain? His mind matches Holmes. Why was Hannibal Lector so terrifying? His intelligence and how he uses it. Even in comic books you find the brilliant villain. Lex Luther is an example.
Up to this point we could be describing any character in the story. The villain has some other characteristics that fit him. He/she may not have all of them, but they will be the basis for his actions which the reader views as evil.
Third, the villain is arrogant. He/she breaks the rules because they shouldn’t apply to him. For this reason he feels justified stealing from his clients, speeding on the highway, blackmailing the hero, or some other nefarious deeds. The villain can hide his arrogance from the world. Remember Uriah Heep from David Copperfield.
Fourth, the villain has negative emotions which drive him to act. I’m referring to anger, hatred, greed, jealousy and fear. This is perhaps the point where the hero and the villain are most dissimilar. There’s a very common connection between fear and anger. What makes a person afraid is what they hate. While the hero can be afraid, he acknowledges this within himself. Our villain won’t. This gives the author scope for making him/her a more complex character.
Finally, the villain is implacable. He/she cannot be avoided. He/she cannot be talked down. He/she won’t stop. This is the trickiest aspect of the character. Do it wrong and you have inhuman monster. Perhaps that’s why so many modern stories rely on the psychopath as the villain. To avoid this trope, simply work harder on showing his emotions and values.
Remember every great story needs a great villain.