How to process a refund?

How to process a refund?

I have created a credit note, but I can't attach it to an invoice.