Every site sale is different and may have different procedures to transfer ownership but from what I know it's usually done through escrow.
Buyer deposits funds in escrow, seller transfers site over (but not complete access), buyer tests and approves, releases funds, seller receives funds and transfers over complete ownership.
Some sales are simpler and can even be done through Paypal. Escrow is advised if you're doing it for the first time.