BNP Paribas interview question

How do credit default swaps work ?