If you make a loan to Bob Smith, and you're worried he might not pay you back, there are institutions that will sell you a CDS. They take a portion of Bob's interest payments (or, alternately, a one-time payment with present value equivalent to the annuity), and in exchange, they agree to cover your loss of principal if Bob defaults. You are swapping some of your interest, for coverage on the risk that Bob defaults on the credit you've extended to him. Hence the name "credit default swap".
We've had two problems with this. First, the companies selling CDSs didn't actually bother to keep around enough assets to pay off their policies. This is as if you crashed your car, went to your insurer for coverage, and they said, "Whoops, we thought you were a perfect driver, so we didn't allocate any money to cover you!" This problem calls for stricter regulation of the amount of capital insurers need to have on hand -- it's closely related to existing regulations on the reserve requirements for commercial banks.
Second, the institutions that write CDSs turned them into tradable instruments, and issued lots of them. This meant that folks who never made a loan to Bob Smith, could accumulate CDSs against him. These people are basically betting that Bob will fail to pay you. This is, IMHO, slightly crazy. It's taking an instrument that's supposed to exist in order to balance risk, and using it to increase risk instead. Insurance is only supposed to benefit people who are actually at risk of loss.
Think of it this way: Would you want your neighbor to be able to buy insurance against your house burning down? If he bought such a policy, and then hung around in your driveway, playing with matches, wouldn't you worry a bit?
But then, I also don't understand why anybody thinks it's a good idea to let people sell stocks or currencies short without being able to specifically identify from whom they've borrowed the asset.