While working with my creative writers recently, a student frowned and said, "I don't want to make a character people don't like."
I wonder what Alan Rickman would have said to that? Most definitely the author, JK Rowling, filled him in on the multi-dimensional character.
Every character in your story is important. If not, get rid of them. No character--as no human--is perfect. We are flawed. We love; we hate; we care; we judge. Your job as a writer is to build three-dimensional imaginative people who readers believe.
As for creating unlikable characters, those can be the most fun.
Villains, antagonists, creeps--all of them--help your hero figure out what she needs and how she'll get there. However, the antagonist and villain are not synonymous.
The antagonist is your hero's biggest adversary. Adversaries can simply be annoying pains in the neck. They can help develop your protagonist, but they are not vital to the plot. This obstacle might also be a phenomenon like the weather (GRAPES OF WRATH) or an institution (CATCHER IN THE RYE, ANIMAL FARM).
Classic antagonists in children's lit include Tinkerbell and The Queen of Hearts. They help the protagonist grow and learn, but they do not tie in directly to the main plot.
The villain is essential to the plot and prevents your hero from reaching resolution. The villain is one whose dastardly ways impede your main character. (In HARRY POTTER, Snape might be seen as an antagonist, whereas Voldemort is clearly the villain.)
Villains we love to hate: the Devil, Moriarity, Captain Hook)
Let's complicate things. The villain might also be your protagonist. This character seeks a goal, but he's not the nicest of people. Think: THE GRINCH, THE GODFATHER, MACBETH, or the TV show DEXTER. In these cases, you can see that a villain/protagonist reads more like a villainous protagonist.
That said, not every story has a villain, but every story has an antagonist. It often depends on your genre.
Whether you are in the middle of your story or just getting started, consider who or what impedes your hero's journey. That is your obstacle. If it's a person or being, they are either your villain or antagonist. If that character is essential to the plot, they are most likely your villain. Think of the fun Rowling had with Voldemort. Readers despised him from the get go, but we also learned more of why he was so tormented.
Without Snape, our antagonist, Harry would never have survived. This we know now.
Create characters with flaws, characters who annoy us, characters who do despicable things. It's your world. Whatever you do, put as much heart and time into developing these hated ones as you do your main character.
Side note: when I told my young writers to imagine a teacher or classmate who truly got on their nerves and turn them into a character in their stories, they each smiled and put pen to paper.
Remember, writing is fun. Have fun.