A debtor's prison is a specifically designated prison established to hold individuals who have outstanding debt. In particular, debtor's prisons are associated with the United Kingdom, which dissolved them in 1869 with the Debtors Act. However, the practice of utilizing debtor's prisons has been around since at least the Middle Ages.
More specifically, a debtor's prison differs from regular prisons in that the goal is to hold the prisoner until someone the prisoner knows and/or the prisoner themselves has a means of paying it. Given the impracticality of not allowing prisoners to work off the debt, many prisons utilized inmates for cheap labor. However, this could be used for things like food and shelter, thus making it practically impossible to remove oneself internally from the prison system. However, some prisons were more lenient, especially to rich criminals without outstanding debt. They were often allowed to work off the grounds and purchase fairly lavish rooms which their families could share.
One of the most famous prisons was known as the Marshalsea, which was located in Southwark, London. It's noted for holding the father of classical novelist Charles Dickens, and Dickens worked to help pay off the debt. Nonetheless, living in poverty and observing the prisons helped establish Dickens' strong objections to the various injustices the poor were subjected to on a daily basis. The Marshalsea contained not only those who failed to pay debts, but it contained those viewed as threats to the government and social order. Most interestingly, those engaging in sodomy, bestiality, and other actions considered to be sexually deviant were often placed in the prisons. There would be little to protect anyone from the actions of such individuals. In fact, there were cases of women going to visit their husbands and fathers only to be sexually assaulted or bribed into prostitution due to their immense poverty.
While debt can result in imprisonment even today, it's generally the practice of nations to allow for individuals to declare bankruptcy in cases of severe debt. As long as debt isn't the result of malicious intent, such as taking money to harm the financial interests of a bank or individual, most cases of outstanding debt are resolved with interest or other methods. However, some areas still imprison people for outstanding debt, such as Dubai and Hong Kong. In most modern democratic countries, there is no debt-based imprisonment, at least with respect to situations with no unusual circumstances. Thankfully, the terrible conditions of debtor's prisons are no longer a threat to those in debt, which make up a significant percentage of the population.