BNP Paribas Interview Question

How do credit default swaps work ?