Who did you buy the car from?
If you buy from a dealer you are protected by The Consumer Rights Act 2015. That legislation gives you the right to ask for a full refund for 30 days from the date of purchase, should the car be faulty.
Essentially, the law says that any product - including a new or secondhand car - must be of satisfactory quality and fit for purpose. In the case of a secondhand car, 'fit for purpose' means that the car must be in a condition that a 'reasonable person' would expect, taking into account its age and the mileage on the clock.
If you bought the car with your credit card, you also have protection under the Consumer Credit Act - mention that to a dealer if you are negotiating. There are several industry organisations you can turn to if all else fails, but talk to the dealer first - it may be the quickest way to resolve the problem.
That all sounds pretty good, but problems can arise if a dealer rejects your contention that the vehicle was not fit for purpose at the point of sale. If you are refused a refund you may end up having to go to court - far better to negotiate with the dealer if you can.The dealer can offer to carry out repairs, but under the new legislation he/she only gets one chance - if the fault isn't fixed first time you can insist on a refund.
If you bought from a private individual you do not have the same level of protection, although the seller must not misrepresent or falsely describe the vehicle - by saying it has had a recent service if it hasn't for instance, or telling you it always starts first time when it doesn't.
Unfortunately, if you try to get your money back and the seller refuses it is far more difficult, and you are likely to end up taking the matter to court