Generally, student loans are not dischargeable in bankruptcy. Bankruptcy law permits discharge of student loans only where the debtor can prove that the debtor cannot provide a minimum standard of living and repay the loans, and even in those situations, sometimes the court will only discharge part of the loan.
Student loans might be held to be unenforceable on account of fraud in the inducement or school closures.
Chapter 13 bankruptcy can sometimes be a vehicle to cure student loan defaults.
Even loans that are not from the government or are not government guaranteed loans can be characterized as student loans if the debt was used for tuition or living expenses while a student. This can even include credit card debt.