To commit to buying a car from a dealer, you have to sign a formal contract of sale. This is an official document with detailed terms and conditions, and once you sign it you are legally committing yourslef to buying a car (Signing a quote is not legally binding for you or the dealership).
If you sign it on the dealer’s premises, there is no cooling-off period if you change your mind. If you sign it away from the premises, you have 14 days after taking delivery of the car to change your mind and get your money back.