After you place your order, our bank checks first with your bank to make sure the funds in your account is available. Your bank then puts a hold on the amount in the account, this hold is called authorization. This is why it seems as if the charge was made right away.
The next step would be for our payment processor to settle the transaction which can take up to 72 hours to process. Once the funds are sent from your bank to ours, the settlement appears on the customer's account, the funds are withdrawn, and the authorization is cancelled. Our bank will then update their records to show that the funds have been received.
This whole process may take a few days before the transaction is completed. For a refund, the process is the same but done in reverse. The time it takes to complete will also depend on your bank/credit card issuer.