Everyone struggles with making their characters believable and realistic. Every author wants their character to resonate with their audience. Every writer want the readers to feel what the characters feel, to root for the "good guys" and hope the "bad guys" fail. But how, exactly, do you instigate this emotional connection?
One major task is to make sure that each good guy has a flaw and each bad guy has a redeeming quality. Don't make the characters flat; there is no such thing as a person who is purely good or purely evil. Well, unless your character is a saint or a devil. Even then, your saint could have an issue with losing his faith or your devil could have a soft spot for orphan children. People relate to what they recognize in themselves.
To accomplish this level of diversity, you have several different approaches available to you. You can model the characters after yourself. If you volunteer at the local soup kitchen, but pull out your credit card every time you see the word "clearance" or "sale," you can give this flaw to your character. You can also mold the characters after your close friends and family. Does your mom have a hard time with road rage, even though she works as an elementary school teacher? Take those values and traits and insert them into your characters (if you follow your friends closely, though, it might be a good idea to warn them that they star in your story!).
Stumped for ideas? Exhausted your close resources? Go sit in a public place, such as at the mall, the movie theater, or an amusement park, and people-watch. Even if you don't see enough to really know what a person's different characteristics may be, you can certainly imagine what they are like. No one cares if it is accurate, and in this case it is 100% okay to judge a book by it's cover. That girl covered in tattoos? Yep, she has an issue with insecurity but she also takes time to play with the neighborhood kids. That guy with his pants slung low? He dropped out of high school, but he also works a dead-end job to help his sick father with the bills.
Along with all this is the idea of giving your character a history. Give them family, friends, and a past to reference throughout the story. In real life, everyone is affected by their past. If you fell off the swings when you were a toddler, you might have an aversion to looking over the edge of a skyscraper. If you got sick after eating a bowl of chicken noodle, you might not be able to see the soup without feeling nauseous now. Allow your character to have these same quirks and you will give them a depth that readers can relate to.