Someone borrows a loan from Bank (A) who then goes to Bank (B) to seek protection from the risk of C defaulting on the loan. B sells protection against default to A (the protection buyer) in return for half-yearly payments. B receives monthly coupon payments from C. If C defaults then A will get the principal portion of the debt from B. If however, the bond never defaults C (the borrower) will pay A the principal and A would continue making half-yearly payments to B until the maturity date of the debt.Companies use CDS to hedge against default on loans by borrowers. Company (A) would essentially seek protection from a third party B, by going short the credit. B would, therefore, be going long. A is the buyer of the protection and B is the seller. A would pay B a periodic fee until the contract expires or a credit event such as a default occurs. Desrosiers (2007) states:A credit default swap is a contract, indexed to a single reference asset, which provides insurance against a default event on that asset. There are three parties involved in a credit default swap. The first is the protection buyer. this is the investor and owner of the reference asset, for example, a General Motors bond. The bond issuer, General Motors in this example, is the second party that plays a role, indirectly, in the CDS. Based on the bond investment, General Motors pays the investor periodic coupon payments and promises to pay the principal portion of the bond at the set maturity date. After purchasing the bond, the investor becomes nervous that General Motors will suffer a credit event and default on its promised, future payments. So, the bond owner purchases protection against the possibility of this credit event in the form of a credit default swap. The CDS is a contract between the protection buyer and a protection seller. The latter is typically an insurance company or a securities company, e.g. Morgan Stanley.