If you understand that life assurance is something you take out in case you die then I am hopeful that we can help you come to terms with credit default swaps. A retail banking example would be where (hypothetically) a bank takes out a life assurance on a borrower so that if they die the loan is repaid.
This doesn’t happen in real life but it makes the point, that a person with a credit risk on their book (the borrower is a credit risk to the bank) can hedge against (take out life assurance) loss (non-repayment of the loan) via the borrower (reference entity) in the event of their death (credit event), quite a mess of parenthesis in that sentence!
A CDS is an insurance against credit risk, it is a privately negotiated bilateral contract. The buyer pays a fixed fee or premium to the seller for a period of time and if a certain ‘credit event’ occurs the protection seller pays the buyer.
A ‘credit event’ can be a payment default or bankruptcy of the company or country …