Characters are one-dimensional when only one side of their personality comes through: the kindly neighbor, the crotchety old man, the snobbish beauty. But no one in real life is always one way, be it kindly, crotchety, or snobbish. This should be true of our characters, as well. That kindly neighbor scolds her granddaughter over small indiscretions because she thinks the girl is spoiled. The crotchety old man wept when his first son was born. And the snobbish beauty is terrified of talking on the telephone because she's always stumbling over words.
Think of Jay Gatsby in F. Scott Fitzgerald's The Great Gatsby. He's rich and throws grand parties at which guests gossip about the sensational things he might have done. Yet, he stands alone on the balcony amongst this revelry, lost in his own thoughts. The unnamed narrator in Jhumpa Lahiri's “A Third and Final Continent" is concerned for his landlord once he learns her advanced age, yet when his wife from an arranged marriage weeps in bed after they're married, he does not turn to comfort her.
These are contrasting traits, facets of personality butting up against each other to reveal a whole—multi-dimensional—person. These contrasts give a character depth and they often reveal a higher truth about the character, too. Gatsby's detachment from his parties, for example, is the reader's first hint that he has motives for throwing them other than general good cheer. Lahiri's unnamed narrator struggles with his sense of duty.
You can also create contrasts by letting a character betray himself in some revealing way. For example, a man might tell his lover he's eager for her return, but stay late to finish a pick up game of basketball with his friends, missing her arrival. His actions betray that he's not as enthused as he claimed about his lover's return. A mother might yell at her sullen teenaged son who has just been brought home by the police. At the same time, she might think she should embrace him instead of yelling. Her thoughts betray that she's not blinded by her anger. She sees the need for more compassionate communication with her son, even though she's not able to do that at the moment. Notice how this, too, can create tension. A reader will wonder if she'll eventually be able to put her anger aside.
Finding motivation can also help you create dimension. If your character has slipped into the stereotype of the angry, demanding boss, take a step back and ask yourself why he's angry and demanding. Perhaps his son is in prison and that has made him feel like a failure, so he overcompensates at work. Tracing a trait back to its origins, whether it's one specific moment, a circumstance, or an upbringing, can help you—as the writer—see the other facets of the character. You likely won't use those exact scenes in the fiction, but being aware of them will enable you to better illuminate that character's other facets within the scenes you do include.
This is how characters gain dimension: the writer allows the reader to see their whole personality, not just one part of it.