The law requires liability insurance for all drivers and vehicles. This means that if you are involved in a serious accident, and it turns out that it was your fault, your insurance company will pay out any claims that are made against you. Extra coverage on your own vehicle, called comprehensive insurance, is optional.
Insurance companies based on a number of risk factors will calculate the price you pay for this insurance. Basically how it works is the more they feel you are at risk of crashing, and the more they think the resulting crash will cost them, the higher the premium you'll pay.
Common factors that will be used to assess the premium are the value of the car you're driving, the safety of that vehicle, the coverage you want, will there be deductibles or limits etc.? How much you'll drive the car, how your driving record stands, how long you've held your license, your age, and if you are young, also your sex.
The premium is then calculated. Usually there is a flat per car, per year rate that everyone pays, regardless of other factors. The other factors will then alter this rate, generally upwards. So if your car is especially fast or dangerous your rate will be increased by a set amount. If it is very old, your rate goes up. If you've had one or more accidents in the past, your rate will go up. If you're young and male, your rate will go up. The more of these factors you satisfy, the more your rate will be going up.
As a sales enhancement, many car insurers offer a "low estimated future mileage" discount to customers who predict that the car's mileage will be below some stated limit during the next premium period. There is no verification involved and no additional charge if the car is subsequently driven more than the stated amount. This arbitrary discount tends to foster customer belief in the mistaken idea that "miles" are just one of many classification factors used to raise or lower prices from the territorial base rate. In fact, odometer miles (which insurers do not use) are not a factor but a metric - the only valid basis for measuring each car's consumption of insurance protection in on-the-road use.
The best way to save on car insurance is to shop around, keep a good clean driving record, drive safely, and choose reliable cars that are not known for their power and speed.