Cancel with Credit Note

How to cancel an invoice with a credit note