Disclaimer: This is not a rant about overseas tech support.
Villains! Where do they come from? How do you handle them? It's easy to fall into the trap of throwing together a nameless, faceless NPC party that walks up to your players' characters and starts beating faces; Lord knows, I've done that plenty of times. It's not that satisfying, is it? No, what your players need are personalities to vent their hatred on.
But what about when your finely crafted - nay! - exquisitely crafted villain goes down in the first round? That's not good either. I've certainly experienced that, too.
How do you create memorable, recurrent villains that seem like they are a part of the world? How do you do it in a way that makes it seems like the players and villains are connected beyond their simplest tropes; "Hi! You must be Player Character. I'm Recurrent Villain! Nice to meet you, now DIE! MWAHAHAHAHA! O! I am slain, forsooth!" Juggling villains is more art than crunch; there are rules you should follow to do it effectively.
First consider where your villains come from. You may be pulling some of them from source material like modules, campaign settings or even looting your own character bin. This is a fine way to come up with villains on short notice, but you may find that they lack an emotional tether to the party; they show up, they beat faces, they get creamed, the party loots them, and moves on; "What have you got for us now, monkey boy? (yawn)". Thus the first rule of using villains effectively:
1. True villains need to be emotionally tied to players.
Players - not characters - provide the hook necessary to create an engaging villain. If you are lucky enough to have one or more committed role-players at your table, this is less true. People who really play their characters are usually willling to imbue emotional motives into them. People who power-play more than roleplay will respond to item theft or ambushes more so than the player who is committed to their character as an extension of themselves.
(Note: I always try to reward this character-centric style of play rather than punish it; it's so beneficial to a healthy campaign to have someone buy into the game that way! Inflicting a villainous trope on them - wiping out the character's family or stealing some treasured item - will probably do more harm to the game than good.)
On the other hand, maybe you have a lot of power-gamers. There's nothing wrong with power-gaming, despite what you read on teh interwebz, it's just a different form of emotional investiture. You can play off of that with your villains too.
2. True villains need not be evil.
Keep in mind that a "villain" doesn't have to be morally diametrically opposed to your group. Those types of villains are fun but can become tedious after a while. Some people think of these types of characters as foils rather than villains, but the secret truth is that in the eyes of the players, they really are villains. If you are a lawful good character, just how do you go about dealing with a lawful good NPC with a competing agenda?
One of my favorite "villains" from my campaigns is a paladin. The group against which he was played was NOT evil, in fact most of them claimed an alignment somewhere on the side of good. This paladin is just more good.
In the scenario in question, the party was investigating some sahuagin attacks on a local fishing town. They were negotiating their reward aggressively with the town leaders, attempting to squeeze as much profit from them as they could and fully expecting to walk away with all the loot from the sahuagin lair AND the better part of the town's coffers.
Unexpectedly, a paladin shows up in the midst of several days of negotiation (not too unlikely since the town had been sending messengers out all around in search of aid). Not only does he offer to take on the quest to wipe out the sahuagin for FREE in return for the construction of a temple within the town, he actually goes around healing the sick and doing other knightly, virtuous things.
The party was flummoxed. Cheated of their "easy money", they weren't quite sure how to deal with the paladin's group. Direct conflict with them was out of the question; they belonged to the same paladin-friendly religion.
They ended up leaving town secretly a day ahead of the paladin in the hopes of pulling off an alpha strike against the sahuagin. They did, and they won, and cheated their erstwhile "ally" of his glory. The good guys don't always play nice with each other, after all.
Consider these things when brewing up your next batch of baddies. How do you engender sufficient party interest in a set of enemies (other than magic item lust, that is)?