Most cars have 3 years or 36,000 miles of warranty coverage--whatever occurs first--should your car break down through normal wear-and-tear. Some cars are covered for even longer periods, either 4 years/40,000 miles or 5 years/50,000 miles.
Most basic warranties will cover any mechanical failure as a result of mechanical breakdown during this period. Not everything is covered, but the things that aren't covered are generally the parts of a car that require routine maintenance. It should also be noted that if routine maintenance has been neglected, your warranty is very likely to be voided. Your Owner's Manual should contain a detailed listing of what isn't covered under the manufacturer's warranty.
Parts that are generally not covered under a basic warranty include: filters, fluids, brakes, brake drums and rotors, wipers, belts, hoses and tires. Emissions, drive trains and rust are also usually covered under separate warranties, though they may come as a package with the new car warranty.
Some states mandate longer warranty coverage periods for high tech, costly parts. Components such as the engine computer and catalytic converters are covered under special warranty for 8 years/80,000 miles.
When servicing a car, you do not need to use OEM parts to service the vehicle in order to keep your warranty valid. It would be wise to retain all maintenance receipts for the record. Some dealers may try to squirm through the fine print by declaring a warranty void. Do keep in mind that misuse of a car (such as racing or replacing OEM parts with aftermarket performance parts) can void a warranty.
Any repairs or replacements you may need will require that you go to a dealership that serves your car model. With a manufacturer's warranty, you should be able to go to any dealership of your choice. Should your car need replacement parts or repairs, you may have to pay a deductible, but the rest of the payment should be taken care of by the company covering the warranty. The company should take care of the payment directly; you should not have to seek reimbursement.
Warranties go into effect the date the cars were built, not the date that they were sold. It is perfectly possible for you to drive a car off a lot that has been sitting there for a year to only have warranty coverage for 2 remaining years. However, you will still have 36,000 miles within those 2 years.
If your car is just out of warranty and a mechanical failure occurs, it is not entirely unheard of to negotiate a lower repair price with the dealer, assuming you have low miles and a solid maintenance record. Some cars have "secret" warranties that specifically extend coverage on a component within a car that has a high rate of failure.
Be sure to buy your extended warranty coverage early, before your new car warranty expires. Waiting for the basic warranty coverage to expire will only make the extended coverage more expensive.