The answer here really, is... it depends. It depends on when the charge was originally made, which payment method/gateway was used, where in the world your store is and which legal jurisdictions it falls under, and your own business rules/processes.
In general, there isn't a wrong way to do it, unless your legal/accounting team says so. Be sure to run any process you have by them, and do it again if you change that process for any reason.
We have documentation for order management, so please refer to that for specifics about how to perform a refund.