When it comes to buying a used car there is always an element of risk and you need to try and protect yourself and you r money as much as possible. If you are thinking about buying a used car privately, you may have very little come back if a fault develops shortly after the purchase. If you believe the car has been miss-sold to you, you may be able to try and take the seller to court to get your money back but often this is not easy and it can be hard to achieve.
Ideally, you want to try and buy a car with some warranty on it. When buying a car from a garage you may get a warranty but you will often pay a higher purchase price for the vehicle than you would of if you had bought
Another option you have is to get a used car check carried out on the vehicle by a third party, prior to buying it. Again it is not 100% guaranteed to pick up on any issues but will check the most likely parts that fail and known issues with that particular car.