How does securitization work?
How can I transform a portfolio of BBB securities into a AAA security?
How does fractional reserve banking work?
How does the insurance industry work?
Before doing so, let me reprise my usual complaint against our shoddy liberal arts education system that leaves so many (including journalists, pundits, politicians and even most public intellectuals) ignorant of basic mathematical and scientific results -- in this case, probability and statistics. Many primitive peoples lack crucial, but simple, cognitive tools that are useful to understand the world around us. For example, the Amazonian Piraha have no word for the number ten. Similarly, the mathematical concepts related to the current financial crisis leave over 95 percent of our population completely baffled. If your Ivy League education didn't prepare you to understand the following, please ask for your money back.
Now on to our discussion...
Suppose you loan $1 to someone who has a probability p of default (not paying back the loan). For simplicity, assume that in event of default you lose the entire $1 (no collateral). Then, the expected loss on the loan is p dollars, and you should charge a fee (interest rate) r > p.
Will you make a profit? Well, with only a single loan you will either make a profit of r or a loss of (1-r) with probabilities (1-p) and p, respectively. There is no guarantee of profit, particularly if p is non-negligible.
But we can improve our situation by making N identical loans, assuming that the probabilities p of default in each case are uncorrelated -- i.e., truly independent of each other. The central limit theorem tells us that, as N becomes large, the probability distribution of total losses is the normal or Gaussian distribution. The expected return is (r - p) times the total amount loaned, and, importantly, the variance of returns goes to zero as 1/N. The probability of a rate of return which is substantially different from (r-p) goes to zero exponentially fast.
There is a simple analogy with coin flips. If you flip a coin a few times, the fraction of heads might be far from half. However, as the number of flips goes to infinity, the fraction of heads will approach half with certainty. The probability that the heads fraction deviates from half is governed by a Gaussian distribution with width that goes to zero as the number of flips goes to infinity. The figure below shows the narrowing of the distribution as the number of trials grows -- eventually the uncertainty in the fraction of heads goes to zero.

We see that aggregating many independent risks into a portfolio allows a reduction in uncertainty in the total outcome. An insurance company can forecast its claims payments much more accurately when the pool of insured is large. A bank has less uncertainty in the expected losses on its loan portfolio as the number of (uncorrelated) loans increases. Charging a sufficiently high interest rate r almost guarantees a profit. Banks with a large number of depositors can also forecast what fraction of deposits will be necessary to cover withdrawals each day.
Now to the magic of tranching, slicing and dicing (financial engineering). Suppose BBB loans have a large probability of default: e.g., p = .1 = 1/10. How can we assemble a less risky security from a pool of BBB loans? An aggregation of many BBB loans will still have an expected loss rate of .1, but the uncertainty in this loss rate can be made quite small if the individual default probabilities are independent of each other. The CDO repackager can create AAA tranches by artificially separating the first chunk of losses from the rest -- i.e., pay someone to take the expected loss (p times the total value of the loan pool) plus some additional cushion. Holders of the remaining AAA tranches are only responsible for losses beyond this first chunk. It is very improbable that fractional losses will significantly exceed p, so the chance of any AAA security suffering a loss is very low.
Problems: did we estimate p properly, or did we use recent bubble data? (Increasing home prices masked high default rates in subprime mortgages.) Are the default probabilities actually uncorrelated? (Not if there was a nationwide housing bubble!) See my talk on the financial crisis for related discussion.
Deeper question: why could Wall Street banks generate such large profits merely by slicing and dicing pools of loans? Is it exactly analogous to the ordinary insurance or banking business, which makes its money by taking r to be a bit higher than p? (Hint: regulation often requires entities like pension funds and banks to hold AAA securities... was there a regulatory premium on AAA securities above and beyond the risk premium?)