If I own a bond issued by AT&T, there is a possibility AT&T will not repay the bond at maturity. If I get worried about that, then I can buy insurance to protect me from that possibility of AT&T defaulting. Essentially, it guarantees I'll get repaid. The risk of the bond issuer defaulting is transferred or swapped to another company, often an insurance company. Of course, I have to pay for this insurance by paying a fee to the new company. They're not going to take on that risk for nothing.
Say, a year later, I'm no longer worried about AT&T being able to repay the loan. But, I still have this insurance or credit default swap that I purchased earlier. To recover some of the money I spent, I can sell it to someone who is still worried about AT&T. They may pay me more or less than I paid. It is a market driven price. If more investors have become worried about AT&T, then I will probably be able to sell it for more than I paid, making a profit. Some firms make a very good living just trading in Credit Default Swaps.
Are you asleep yet?
You can do the same for bonds issued by the U.S. government. Fortunately, the cost of buying such insurance against a U.S. default is very cheap, because we still have a AAA rating. If I own a bond issued by the government of Portugal due in 5 years and want insurance or a CDS that I will be repaid, the current price is about $54,490 per million. For Greece, it is $95,480, indicating investors are still more worried about Greece than Portugal.
Here's the interesting part . . .
Watching the changes in these prices tell you a great deal about the expected financial stability of other countries. When the bond market turns against you, this is where it shows up first. When the cost of Credit Default Swaps start rising, somebody out there in the marketplace probably knows more about something than you do, and it is time to start digging!
Now, was that really so boring?