The most interesting characters are the ones who are flawed because we all are. You want to avoid making people cliches of "good" or "evil," as much as you want to avoid making them all good or all bad. Your readers will identity with the humanity you give your characters, good and bad characteristics alike, because we all have traces of both.
Your challenge as a writer is to make your reader root for the characters you want them to cheer for, hate the ones you want them to hate, and everything in between.
I can tell you from personal experience that it's not as easy as it sounds, because you're coming at it from
your POV, with
your personal feelings, experiences, and biases about certain traits. Your readers are coming at it from each of theirs, and of course their feelings, experiences, and biases will differ.
It takes time and writing a lot to get a feel for this, and even then you will have readers who "hate" or at least can't identify with your hero/heroine for one reason or another.
The most helpful things I do when setting out to write a new story are to first have clearly defined roles for my main characters. Who do I want the readers to love? Who do I want them to not love - maybe not hate - but definitely not see as the hero or heroine? Depending on what genre you're writing, you certainly can have more than one protagonist and more than one antagonist in a story, and they don't all have to be pure or evil. They can be shades of each in between, but remember that you want to give your readers at least one character they can totally cheer for so they keep turning the pages.
The next thing I do is write out their personalities and backgrounds. Most of that won't make it into your story, but YOU will know it, and it will help you keep the characters consistent throughout. These details give them realism and depth. Nothing is more frustrating to a reader than to have a character flip-flop or waffle so much through the whole story that they can't figure out who this person is. Equally bad is a character who is flat or two-dimensional.
The third thing I do is write out my main characters' goals, motivations, and conflicts. Without conflict there is no story. Without your main character(s) growing and changing in some way, readers won't have a reason to keep turning pages. To understand where you want your main characters to be at the end of the story, and how and why you want them to change, you need to understand both your story arc, and your character arc for each of those main characters.
What are they trying to accomplish in this story and why? What stands in their way? What will they need to do in order to jump over that hurdle, conquer it, whatever they need to do to it, so they can reach their goal? Of course your protagonist and antagonist will have competing goals, or at least very different ones, depending on their exact roles in the story.
Debra Dixon's
Goal, Motivation, and Conflict is my "bible" when I write all this out. (MUCH cheaper to order it directly from the publisher
HERE than from Amazon!) She explains GMC as well as other aspects of a story, and does so in a way that simply makes sense. As one example, she uses
The Wizard of Oz:
Wicked Witch's external goal: the ruby slippers; internal goal: respect
External motivation: the slippers will make her the most powerful witch in Oz; internal motivation: she's always felt inferior to her sister and the other witches
External conflict: Dorothy won't give them up; internal conflict: respect has to be earned, not stolen
As opposed to Dorothy's external goal: to get back home; internal goal: to find her heart's desire
External motivation: Auntie Em is sick; internal motivation: she's unhappy
External conflict: The wicked witch; internal conflict: she doesn't know what she wants
Dorothy and the witch have competing goals. Dorothy wants to go home and the witch wants those slippers. What the reader doesn't yet know is that those slippers are the key to her going home. I love this example because it's simple, yet complex on so many levels, and without those slippers the story arc and the character arc fall apart for our heroine.
No arcs = no story. It's just rambling otherwise, and your reader won't understand where you're going, or why they're supposed to care about what happens. No character arc = no growth, and your reader will be bored. If your protagonist doesn't have to work very hard to get what she/he wants, what motivation does your reader have to keep turning the pages? Why should they care what happens to these characters?
Hope this all helps.