In a debt-for-equity swap, some of a firm's debt is cancelled and lenders are given shares.
Firms basically have two sources of external finance: bank loans ('debt') and funds from shareholders ('equity'). In a debt-for-equity swap, some of a firm's debt is cancelled and lenders are given shares.
This is often a sign that a firm is in trouble- perhaps unable to make the cash needed to meet interest payments, or in breach of the debt-to-equity ratio specified by lenders and unable to raise extra capital via new bank loans, or from shareholders via a rights issue.
The swap is bad news for shareholders because it creates extra shares that they are not entitled to buy, diluting their existing holding. But the alternative, a forced liquidation initiated by lenders, often leaves shareholders with nothing at all.