I think there are three kinds of fictional villain.
Bad villains (and by ‘bad’, I mean badly written!) are the opposite of the hero: they are ugly, dissolute, petty and cruel, while he is square-jawed and noble, their physical and mental superior. Because they have nothing in common with the hero, there can be no moral complexity to the story: one side will win, or the other will, and its always the one you expect.
Good villains are the same as the hero in many important ways. They may have similar backgrounds, similar preoccupations, aspirations and desires. They probably want the same thing the hero wants – a job, a particular love interest, the child who knows the secret code, a lost nuclear bomb – though they want to do completely different things with it.
Their skills are probably different – an intellectual villain opposing a instinctive, fist-fighting hero, or vice versa – but that dreadful cliché of bad guy dialogue “We’re not so different, you and I” is basically true.
But, as demonstrated ably by the original Star Wars trilogy, the very best villains are the man we fear the hero will become…