The Marshalsea is a prison that was originally divided into two parts: one part for those who couldn't pay their debts and the other for smugglers. (In other words not-that-bad guys vs. pretty bad guys). But over time, the prison buildings have fallen into disrepair, and all these prisoners now mingle together.
One day Mr. Dorrit is taken to Marshalsea.
He is in his 40s, married, with two children and another on the way. He has almost no idea what his debt is.
(But Shmoop does. Check it out: back in early 19th century, all companies were called "partnerships" because anyone who invested in one became a partner. What that meant was that all investors/partners owned the company equally. And also that every investor/partner could be personally responsible for all of the company's debts, regardless of what the other partners were doing. What's happened to Dorrit is this: his partners in the company ran off with the goods and the money (legally, since they owned them) – and left him with the company debts (again, all perfectly legal). In the middle of the 19th century, corporations were finally invented, and investing in a company became much more like what we think of today – you can buy some stock in General Motors, but that doesn't make you responsible for that company in any way.)
So, yeah. Mr. Dorrit. Debts. Prison.
His wife and kids come with, because where else are they going to go? They aren't actually prisoners, though, and can come and go as they please. A few months later, his youngest daughter is born inside the prison.
Eight years later, his wife dies.
Mr. Dorrit has become very used to prison life.
His son takes over from Mrs. Bangham as the prison's errand-boy.
Eventually he is the longest-serving prisoner and gets the nickname Father of the Marshalsea.
He starts to be proud of this title, and exaggerates how many years he's been in prison, how fancy a gentleman he used to be before, and how much debt he really has.
Other prisoners who are leaving start giving him tips as a kind of charity and token of respect. He starts to expect, and then demand, these handouts.