There are as many devices for creating dept in a character as there are writers.
Some of the most common are:
Back story
Gossip
Flashbacks
Implication
Allusion
Disclosure by 3rd party
Jeff is a nice guy, fit and quiet in his demeanor but he's got a secret: he went to jail for six months for a drug rap. He's 20 now and starting college a bit late. Here's a few ways that an author might handle it.
Back story
The bell rang at ten minutes to seven just like it did in the joint. The difference now was that Jeff was heading to class instead of a sink full of breakfast dishes for a thousand.
Gossip
Michael whispered to his fag-hag Cheryl,"Who is that new guy. I mean Oh God what an ass."
Cheryl, completely unable to let go of a juicy piece of gossip said, "Oh he's bad news Mikey. His name is Jeff something. My girlfriend Paige who works in admissions said he did some jail time for getting caught with X."
Flashbacks
Everything was going well with the fraternity initiation until they put a blindfold on Jeff. Suddenly his prison rape nightmare was happening all over again with the guys holding him helpless in a sheet while they took turns on him. He freaked out so bad he jumped out a second story window to get away.
Implication
Jeff's demeanor around other students was very reserved. He avoided conversation and eye contact. When it was necessary to engage another student, he was unusually intense and made a point to be the Alpha dog.
Allusion
Kirk said, "Come on dude let's go! It's spring break. What are you waiting for? Parole?"
Jeff answered with a blank stare.
Disclosure by 3rd party
The stranger showed the two college students his Deputy Sheriffs badge and said, "Do either of you know Jeff Lorman?"
Michael and Steven both nodded, "Yeah we know who he is."
"You guys know who he hangs with?"
Michael shook his head.
Steven said, "No, he's not really the sociable type. He keeps to himself."
The Deputy said, "Well, stay clear of him, he's bad news. He did six months of a dime upstate and got the rest of his sentence suspended for dealing. We're watching him and when he does screw up, we'll be there."