When we read a book, watch a movie, or tune in to a TV show we can be relatively sure that the hero is going to win. Sure, sometimes a work will throw us for a loop and you'll get a pyrric victory, but generally speaking the "good guy" wins in some way. The tension comes from how they will win, what they will endure, and where it's going to end up hurting. In RPGs however, the dice mean that the heroes' victory - the PCs' victory - is not assured. Which begs the question. If your villains can win, can they win in a meaningful way?
No Game Over Screen
When I say meaningful, I mean in a way that is clearly a deal breaker for the game. If your villains can only win in a way that would make a videogame a "Game Over" screen and prompt to load the most recent save then the victory is not meaningful. Afterall, all the PCs are dead or defeated, the world is over, or something else has happened that means the game is effectively over.
A New Beginning
A meaningful "win" for the bad guys makes for a new beginning. Just like how a win for the good guys makes for a new beginning. When the hero beats the villain we get a brand new day full of hope and free from the danger that was presented. When the villain wins, we should get something similar. A new day, a new paradigm, and a whole new world now that the heroes who could stop the villain are defeated.
More Than Just An Earth Shattering Kaboom
For this to happen your villains need to have bigger motives than just destroying the world. Don't get me wrong, for some games that is all well and good. The world should be in jeapordy. Every player deserves to get a chance at saving the world at least once.
So what else can they be going for? Running the world is one that both threatens the world and leaves you a setting to play in even if the heroes can't stop the villain in time. Same with things like becoming a god, or just blowing up just a part of the world.
Defeat Can't Mean Kill Too
The other part of this is that there needs to be defeat available for the PCs that isn't just killing them. Obviously some PCs will fight to the death, but there are ways to lose without even getting in a fight. Just taking too long to catch the villain can make that happen.
Can your villains win? If not, why not? It might help your game out if they can.