A mortgage-backed security is a form of asset-backed security, in which the issuer uses a portion of the cash flows from the asset to make periodic payments to the investors. Typically ownership of the assets will be transferred to a bankruptcy-remote trust and investors buy shares in the trust. The proceeds are used to set up a reserve fund and to buy the assets from the issuer. The cash flows from the assets are first used to pay for the servicing of the assets (e.g., cost of collection of payments on the mortgages), then to make a cascading waterfall of payments to the various tranches in the securitization (e.g., class A shares before class B shares). Any leftover money, known as residuals, is retained by the issuer.
Issuers like securitizations because it gets them the principal balance of the assets immediately, so that they can generate more assets (e.g., approve more loans). Also, investors typically pay a premium over the nominal value of the assets, reflecting the fact that the securitization pays interest on top of principal payments, so the issuer gets part of its future profits up front. The rest of the profits come from the residual income and advisory and servicing fees.
In most cases the investors in a securitization like to see "credit enhancement". This can include excess spread (i.e., the cash flows from the assets exceed the interest payments promised to investors), overcollateralization (i.e., more assets in the trust than the amounts paid by the investors), and bond insurance (i.e., insurance against issuer default on the issuer's obligation to make periodic payments of principal and interest).
If the cash flows are insufficient, first the residual income disappears, then payments to the class B shares, then payments to the class A shares.
Securitizations are a complicated form of structured finance. Very few investors understood the risks. Most believed that a AAA-rated securitization was low risk, even though a AAA-rated investment can still lose half its value (or more). Many subprime mortgage securitizations were also improperly granted AAA ratings.
Many borrowers of subprime mortgages had purchased houses they really couldn't afford. Sometimes they relied on 3/1 or 5/1 adjustable rate mortgages, which reduced the interest rate for 3 or 5 and then adjusted the rates annually. Others were in interest-only mortgages. This is in contrast with fixed-rate mortgages, which have level payments throughout the 15 or 30 year term of the mortgage. When interest rates began increasing, borrowers who were at the edge of their ability to repay began defaulting. Job loss also contributed to the problem, as did Alt-A (stated income or no doc loans, also known as "liar loans") and rampant fraud. Many of the homes were overvalued (partly due to the housing market bubble, partly due to fraudulent appraisals) and has insufficient down payments to protect the lender against this.
When the borrowers defaulted, it caused the cash flows in the securitizations to collapse. This lead to downgrades in the securitization ratings and the value of the investments plummeted. Investors got burned. But since they did not understand the risks associated with the investments, they backed away from all securitizations, including those that were less risky, such as prime mortgages, auto loans and student loans. This led to a contagion effect, where capital became scarce. Issuers then had to increase the interest rates they were paying to attract investors, increasing the cost of funds. This made the lenders less profitable, affecting their ratings, causing their cost of funds to increase even further. It became a self-fulfilling prophesy. Because of the greater risk, financial institutions then stopped lending to other financial institutions. This yielded a massive feedback loop in which liquidity stopped flowing (investors retreated to "safe" investments, like US Treasuries) and cost of funds increased. Business investment slowed and layoffs increased, further accelerating foreclosures on subprime and even prime mortgages and other consumer debt.
The solution to this mess is to get liquidity flowing again. While government investment can help, it is more important to leverage government funding to spur investment by others. So mechanisms like standby loan purchase agreements and government-backed bond insurance are more likely to solve the problem than literally passing the buck to the banks in the hope that they will know how to solve the problem.
For more details, especially on the nature of the problem from a student loan perspective, see www.finaid.org/creditcrisis.