One of the trickier things in fiction is creating characters who are likable and sympathetic, but still believably flawed. The worst thing you can do with a hero is make him or her perfect. Perfect people don't exist in real life; perfect people in fiction are unbelievable, obnoxious, and boring.
Fiction derives from conflict, and whether your story is a mainstream coming-of-age novel or an edge-of-your-seat zombie apocalypse thriller, the conflict has to derive at least in part from your characters' flaws. Their insecurities, foibles, and issues must help drive their actions.
A few things to think about when creating good-but-flawed characters:
1. Flaws must be large enough to affect the story and the characters' interactions with each other, but not so great that they tip the character over into villain territory. A good-but-flawed character can have problems communicating with his wife about their relationship. A villain beats his wife.
2. Flaws must not be so minor as to have no effect whatsoever on the story. It does nothing for the story if a character's flakiness about finances has no greater consequence than being unable to join coworkers for Friday lunch at the tapas restaurant. It's another matter if the character's financial flakiness means she couldn't get a flight to Omaha and see her father on his deathbed. I tend to allow my characters one Colossal Mistake per book - two at the most. More than that, and people will start to lose sympathy. But one is all you should need, provided it's in the right time and place for the character. And as long as it's in character, which leads us to...
3. Flaws must be organic to the characters. If a character has always been conscientious about his schoolwork, it makes no sense for him to suddenly skip a semester's worth of classes and miss out on graduation.
One way to create flawed-but-sympathetic characters is to look at your friends and family. What are their tics and foibles? Use those for inspiration.
And of course, you can look to see how other writers do it. For a quick and excellent example, watch the movie It's a Wonderful Life (it's about that time of year anyway). Pay attention to George Bailey, and you'll notice he's far from perfect. He's a hero in a quiet sort of way, but he's also bitter and resentful at times. He's focused on the missed opportunities of his life, so much so that he doesn't see the good he's done until it's almost too late. Director Frank Capra and actor Jimmy Stewart aren't afraid to let George Bailey be flawed, even to the point of unloading his anger on his family. But because we understand George and why he has his flaws, and because we understand he's a good man driven to the breaking point, he never loses our sympathy. And that's why we are on board with the friends and family who do everything to help him.