That’s a very good question. The best characters are flawed. They are neither wholly good or wholly evil. They do their best with good or bad results. In short, they are like real people. They drink, swear, and lie. They are not always good. They fight with each other. They yell, scream, laugh, and cry.
Good characters can be hard to write. They have flaws and we tend to not want them to be flawed. A flawless character is boring, though. So we introduce little flaws here and there. Maybe our sweet little old lady swears like a sailor when stressed. People swear. That’s not to say that you need to have her swear every time she speaks. You only need to do it every now and then, when it’s appropriate. Something annoys her and she cusses. That’s just an example, but you get the idea.
The point is, you need to give your characters a few flaws to make them more like real people. No one is flawless, whatever they might tell you. Human beings are not perfect and neither should your characters be. Perfection can be boring and we do not want to be boring. We want our characters to be friends of ours. It’s even better if the readers can see them as friends of theirs, we have done our jobs as authors. The reader will worry about the characters and their wellbeing.
The flaws in our characters should only come out in the appropriate places. Our sweet little old lady should only let loose a stream of profanity when she encounters a serious issue. Our hero should only lie when he is cornered and feels threatened, unless he is a pathological liar who must overcome that flaw by the end of the story. In other words, characters should behave the way a real person with the same set of flaws would behave under the circumstances. That will make the characters believable and believable is good.
Characters who aren’t believable people are not good characters. In order to be believable people, they need to be as flawed as real human beings to be plausible characters. Flawed characters help readers to connect with the story and leads them to an enjoyable experience. Make it hard for the character to pass a slot machine without sitting down and playing, but don’t make it so hard that the story stops there. Balance is good.
You need to balance the flaws against the character’s good points and that will make all the difference. No one is wholly good, just as no one is wholly evil. So give your hero a few flaws and your villain a few redeeming qualities and let the story roll.