Well, as these markets became deregulated, Wall Street came up with ever more complex financial instruments for packaging together securities and derivatives. Take the subprime mortgages, for example, which were the bad loans given to bad credit risks where the bank was counting on a foreclosure so it could get the house back after it had appreciated in price (except the price collapsed instead). These are very risky loans, and if you were to assemble a security based upon them, a buyer would demand a very high interest rate on it, since it is a "junk bond," so the issuer of those mortgages would not get paid much for selling off a bunch of bad mortgages. But what these firms did is set up a complex hierarchy of securities based upon these bad mortgages. The first set would be like "preferred stock," that is, if anything happened, whoever held them would be first in line to get paid. Then the second set would pay off, then the third set, and so forth. The trick is that the first set would get a very high bond rating, like AA/AAA, so those firms could package up bad loans, basically launder them into high-grade bonds, and get a very high price for them.
The problem was that once real estate prices fell, all those bonds, regardless of rating, were utterly worthless.
And since they were high-rated bonds, big banks and pension funds had snapped them up, and were left holding the bag.