You there! IMPOSTOR!
Okay fine. I suppose you aren't an impostor, but thought I'd check...you seemed a wee bit suspicious...but I digress. The point is, when you're writing about your main character (hereafter MC) you need to make them real. None of those cardboard cutouts or those creepy little mannequin things.
So. How do we avoid those things above? Quite simple really if you think about it really hard....are you thinking really hard? Good. Well, I shall tell you what I do to keep the mannequins away.
1. When you're writing dialogue, take into consideration lisps, accents, favored words, etc. If the MC always talks with a Scottish lilt, then keep this consistent throughout the entire story. If you make the MC randomly change to German, not cool. Unless they just had a personality transplant done by some extraterrestrials who are really craving a snow cone. Then it might be allowed.
Also, to keep the dialogue realistic, what I always do is act it out aloud. I know, it might be a tad awkward to do this if you're sitting in a public place drinking an iced latte, but you can deal with it can't you? If you don't want to talk it out loud, then at least mumble or whisper it. Although, accents are hard to distinguish when mumbled aloud... Even so, reading through your dialogue will keep the characters sounding real and the conversations actually sounding like a conversation you'd have with a friend.
2. Now, to keep the characters' actions real, this is quite similar to the dialogue. You need to keep odd habits consistent through the book's plot. If Jimmy suddenly stops wiggling his ears when he's nervous and instead does the polka dance, that wouldn't be realistic. Do you stop biting your nails and start polka dancing instead? No? I thought not.
It never hurts to act out your character either. I find myself doing this a lot. If I type in the words, "the boy slouched forward, chin on a curled up fist, and scrunched his eyebrows together while gritting his teeth in frustration" I tend to sit there slouching forward, chin on a curled up fist, and scrunching my eyebrows together while gritting my teeth in mock frustration. If this position doesn't seem natural to me, I'll change it. Because I think the eyebrows were a bit too much...
So, top sum this up. Your characters are real people in the plot you form around them. Give them characteristics that make them unique to those around them, and keep those qualities going through the book or the character will never seem real enough. Don't be afraid to act out pieces of your plot to see how it'll flow either!