In any sort of way that gives them control. They can be smarter, they can be of higher social status, they can be superiors on the job, they can be utterly unscrupulous, they can be physically stronger, they can smooth-talk everyone in sight and slander the heroes, they can have access to knowledge that the heroes don't -- such as the knowledge that they are the villains. They can collectively have more power; a hero who can deal with one malicious gossip can hardly deal with a city full of them.
POV helps. We see the heroes floundering about in ignorance of everything except how disastrous it will be if they fail; we see the villains only carrying out their deeds, which makes them look far more confident and decisive. But the power differential has to be real.
For one thing, the heroes need a challenge, or the story will lack luster. Powerful villains racket up suspense, and allow the hero to be defeated. It makes the hero the underdog, and we all root for an underdog. Making the villain the underdog arouses sympathy for him. This can be very, very, very dangerous. Better to have the hero the one suffering; there are complications in keeping him sympathetic while suffering, but nothing beside those when he doesn't suffer.
(Mary Sue, however, lies in lurk. Usually, she doesn't get to be the underdog -- except insofar as the writer says she is -- but sometimes, the writer just ladles it on in the apparent belief that suffering just makes her sympathetic. Doesn't help that she tends to not show trauma, to be sure.)
But even if you manage that correctly, there is the trifling problem of the climax. How to end the story when the villain is more powerful. And just having the villain win is unsatisfactory. We want the story to end with a reversal of fortunes, Aristotle's peripetea, and not just happen to stop at a point where it could meander on and on because the villain is still powerful. (And that's the aesthetic reason. It is also No Fun At All.)
There is, of course, the orchestrating of powers. If the villain is powerful because of the enchanted gemstones, the hero can learn enough to turn their power back on him -- cleverness is usually good. More usually, the hero learns to be more powerful in the course of the story. Training or knowledge or what -- and the biggest thing under "what" is acquiring teammates who will back him up.
Which leads into the other technique, which I not only like but rather expect to see in a story: the hero wins because he is good, and the villains loses because he is evil. The hero acquires those teammates because he helps someone who turns out to not be so helpless, or to have a helpful friend, while the villain, who started out with the strong team, starts to whittle it down because he does not trust them, or does not want to share the reward -- which can, in fact, be the source of the hero's allies. The hero tells the truth when the villain lies, and wins trust. The villain bases his plan on the certain knowledge that the hero will not possibly hand over the secret to another soul. Etc. Indeed, I find a story where the hero's victory is not even the slightest bit brought about because he is good to rather flat.