When you cancel an invoice, the customer's account will be credited. This is different from refunding an invoice, where money is sent to the customer using their chosen payment gateway.
If you use Quickbooks please see the article on cancelled invoices in QBO.