The inevitable result of trying to have it both ways is a character that defies human nature. Since all storytellers face similar dilemmas, unrealistic character traits come in a number of distinct flavors.
Inexplicably Chaste Edward Cullen is over years old when Twilight begins, yet according to author Stephenie Meyers, he never kissed a girl before Bella.
Anne Rice , you have done horrible damage to vampires everywhere. In the beginning, he painstakingly explains why she has not been raped. She has struggled just to eat, and the right romantic partner could get her food, safety, and shelter. To give conservatives a break, I should also say there are instances where sex is not realistic. Two children of similar ages that grow up together are unlikely to be interested in each other. This is still true if they are not genetically related.
I have written a comment in response to concerns that this section marginalizes asexuals or other various lifestyle choices. Storytellers want heroes to stand out from normal people. An easy way to do this is to set your story in a culture you consider inferior in some ways, and then have your hero see past it. But this tactic can come off as cheap and contrived.
At worst, cultural anomalies can also be used to express racism. Just replace the Drow with a real group of people, or a race that is reminiscent of a real group. If you want your character to have different values than the people around her, she also needs to have different experiences.
Unaffected by Hardship In Snow White and the Huntsman , Snow White is locked in a room from childhood until sometime after adolescence. Then she escapes, learns to fight, and leads an army to take the kingdom back. Except for a inclination toward terrible speeches, she comes out unscathed. That effect is generally not good — a real Harry Potter could suffer from depression and anxiety, or exhibit violent behavior.
He might think his role in life is to be a doormat, and surround himself with other people that abuse him. Or he might abuse others. Serial stories like TV shows also have a habit of neglecting the long term impact of tough times. Star Trek is particularly notorious for torturing a character in one episode, and then never mentioning it again, as though no recovery period was needed.
Characters can overcome and move past previous tragedies, but the audience needs to see them struggle with their demons. To do less is to dismiss the harm inflicted on real people in similar situations.
Lightspeed Learner Tristan is a naive and socially awkward boy at the start of the Stardust movie. He has perhaps a day of training on a flying pirate ship. Good storytellers start the protagonist with humbling spinach , and then make him more awesome until he defeats the villain, is crowned king, and lives on in the legends of his people. But what if your story takes place in a matter of days?
The Matrix is one of the few good examples of this happening. They have the technology to simply download the knowledge they need into their minds. An event that would have a strong impact on anyone gives that to him. Try something similar if you need to level up your protagonist in a short time period.
They knew the secrets of their world, and predicted the quest he would have to embark on. Somehow despite that, the only useful thing he learns from them is how to read. He goes off on his journey completely ignorant about any of the animals, plants, peoples, or places around him.
Imagine if you stepped out your door and became frightened by a squirrel. Spec fic storytellers are always struggling to find ways to explain their world without resorting to exposition. Having an ignorant protagonist allows the storyteller to explain through that character.
Few things that are either prevalent or have a strong influence on the world would be unknown to anyone dwelling outside of a breadbox. Alternately, you can give your character commonly held misconceptions or false rumors, and have her learn the truth along the way.
The easiest way to avoid unrealistic behavior is to research how real people behave in similar situations. If real people who are locked in a basement through adolescence end up with serious problems, so would your dungeon-confined character. Not that your character should be like everyone else; you want him to be distinctive. But the bigger the gap between his traits and normal behavior, the more convincing your explanation must be.