It is a derivative instrument whereby the holder of a bond buys the instrument to cover the risk of credit default by the bond issuer. As per investopedia, speculation has grown to be the most common function for a CDS contract. CDS provide a very efficient way to take a view on the credit of a reference entity. An investor with a positive view on the credit quality of a company can sell protection and collect the payments that go along with it rather than spend a lot of money to load up on the company’s bonds. An investor with a negative view of the company’s credit can buy protection for a relatively small periodic fee and receive a big payoff if the company defaults on its bonds or has some other credit event. A CDS can also serve as a way to access maturity exposures that would otherwise be unavailable, access credit risk when the supply of bonds is limited, or invest in foreign credits without currency risk.

Now this means that with the CDS acting as speculative instruments, things can go really bad…and that’s what caused the failure of Lehman brothers.

More research on this in some time..