Decide who will be the bad guy. In some cases, the identity of the bad guy is a secret that is gradually revealed over the course of the story---for example, in a mystery novel. In other novels, films or TV shows, the bad guy's identity is obvious right from the start. In either case, try to make your bad guy somebody surprising. Don't take the easy way out by making the bad guy the obvious person.
Determine how the bad guy became bad. Your bad guy did not just spring up evil---unless, of course, he is a paranormal being or that is the theme of your story. In most cases, the bad guy became bad because of real things that happened or choices the bad guy made. You don't have to explain all the details in your story, but knowing how he got to be that way will help you paint his character in a believable way.
Give your bad guy a credible reason for hating the protagonist. It's not good enough for your bad guy to hate the protagonist simply because the protagonist is a good guy---and vice versa. Your protagonist should not automatically hate the bad guy. All your bad guy's actions should be backed up by real-sounding justifications.
Make her bad. You'd be surprised by how, well, not bad many bad guys are. A bad guy who is too sympathetic, who doesn't really do anything bad but is all just talk, or who turns out not to be a bad guy in the end---these are all acceptable devices in fiction, but they should be the exception. Mostly, bad guys do bad things.
Make him likable. Likable? Yes, that's right; the best bad guys are characters your audience loves to hate. That doesn't mean your bad guy has to be a sympathetic character. Your audience will probably want your bad guy to lose. But your audience shouldn't hate reading about or watching your bad guy. Make your bad guy entertaining and likable, and you've succeeded in making him memorable.
Finally, give your bad guy more dimensions than simply being bad. Give her a personality outside of her badness. What type of vehicle does she drive? What causes does she believe in? The normality of the rest of her character will make her badness stand out even more.