A recapitalization is a change in a company's capital structure.
A company might want to increase its debt in an attempt to avert a hostile takeover. In so doing, it might take on additional debt to fund the buyback of shares, which would accomplish the debt/equity exchange.
On the other hand, a company filing for bankruptcy might decrease debt by exchanging it for equity. For instance, when Oneida (the crystal/flatware/dinnerware company) filed for bankruptcy in 2006, it cancelled all existing preferred and common stock shares (the bankruptcy rendered them worthless anyway), and issued 100% of its new common stock to one of its creditors in exchange for the cancellation of the debt.
A financially sound company might adopt a recapitalization plan to save on taxes. An example of this would be replacing preferred stock with bonds, which would gain tax deductions against income. This is because preferred stock pays dividends (which are non-deductible), while bonds pay interest (the coupon) -- which is deductible.