A credit default swap (CDS) is a monetary swap contract that the seller of the CDS will compensate the purchaser (the creditor of the recommendation loan) in the occasion of a loan default (by the debtor) or other credit event. The purchaser of the CDS makes a series of payments (the CDS "fee" or "spread out") to the seller and, in exchange, receives a benefit if the loan defaults.
In case of default the buyer of the CDS gets settlement (generally the face value of the loan), and the seller of the CDS seizes the defaulted loan. Nevertheless, anybody with adequate security to trade with a bank or hedge fund can purchase a CDS, even purchasers who do not hold the loan instrument and who have no direct insurable interest in the loan (these are called "naked" CDSs).