Depends.
I sold my VXR to a mate. He paid me by cheque but took the car there and then. When the cheque cleared I paid the finance. No issues, we're best mates so plenty of trust.
I sold the Mini to a dealer. He paid us the cash directly, then sat there whilst we then paid the finance company over the phone.
I sold the 911 to a random. He paid the finance directly by CHAPS (which, btw, only guarantees same day before 5pm NOT instant payment as we found out!), then when both he and I had proof the finance was clear did I give him the keys.
The latter way is the only way to do it really. Both of you need to be happy the finance has been paid off, so as the buyer you should pay the finance company directly. Btw don't believe anyone who says that if you buy a car with finance outstanding that they can repossess it as that's nonsense: If you bought in good faith and didn't know about the finance, then you have clear title to the car. The finance co have to chase the person who the finance was with, they no longer have any rights to the car at all and if they take it then that's theft.
*EDIT* That last para looks really harsh on Richf now, sorry mate I was still composing when you posted! I'm right though, they cannot simply repossess if you didn't know about the finance. If you did, then that's not clear title and they CAN take it back.