What exactly happens electronically when money is transferred using SWIFT?

Hi

What exactly happens electronically when money is transferred using SWIFT?
As I understand it, information concerning my account is transferred to the bank of the recipients account informing them to credit the recipient’s account with $ X. The recipients bank then credits the recipient the equivalent in cash. My bank then debits my account as soon as the transaction has been completed. Is this correct?
I look forward to your feedback
davidmich