When buying a new or second-hand car, you may be offered a warranty. All new cars come with some warranty, most of the time it is 3 years but a few manufacturers may give you more. If you are buying a used car then you may get 12 months if it is mid-price range to 1-3 months for cheaper vehicles. Some second-hand cars may not come with any warranty when buying privately or from a small independent garage.
If you are given a warranty, it is important to try and find out how long it is. Some garages will state that most things are covered but you really need to check the small print to find out what is and what is not. Obviously wear and tear components such as brake pads disc and tyres are not covered but it may be that it only actually covers major components such as engine and gearbox.
If you buy a second-hand car and notice that something is not working such as the spare fob or the air con, then it is definitely worth contacting the garage as even if it is not supposed to be covered by the warranty, they may still agree to look at it for you as a goodwill gesture.