A business that fails typically declares bankruptcy. When they're bankrupt, all assets are evaluated and sold, partially repaying the business's outstanding debt. The rest of the debt becomes a loss for any investors.