The quality of a gearbox depends highly on the previous owner(s). This means that you can find out what the general condition of a car is by just checking the gearbox. A poorly functioning gearbox can very well mean that the car in general has been treated badly. An important part which you should check in combination with the gearbox is the clutch.
The hand-over of a car is basically a nice conclusion of the purchase process. The car is polished, the paperwork is handled by the dealer, and the only thing on your mind is to drive off. However, it is recommended to go through the agreement you made with the seller one more time. Make sure that all the promises are honoured. It is always easier to get things done while you still have your money in your pocket.
When you are finalising your purchase, a contract will have to be drawn up. The contents of this contract will largely depend on the salesman, providing that you are not interfering with it yourself. It is important that you do not sign a contract without knowing exactly what is in it. So, make sure that all the promises are written down: e.g. when the car is delivered with a fresh MOT, make sure it is written down in the contract.