Banks initially often may try to restructure the debt - allow later payment, increase installments, reduce interest etc..
Recovery attempts
Defaulters borrow money from banks but fail to pay back. THen, the bank employs various means - seizing assets of defaulters or better yet those who guaranteed payment, shaming and illegal coercion in some cases to recover the money. Defaulters with political power often get their debts written off.
Collateral
[Incomplete]
Insurance
See section on credit default swaps.
Reduced capital
Bad loans usually reduce a bank’s capital. But, sometimes, the amount of bad loans exceeds the bank’s capital, and the bank becomes insolvent. The bank then is incapable of repaying the depositors.