They price their premiums so that they always make a profit, regardless of the risk.
That's why drivers that have accidents pay more than drivers with no accidents and young drivers (that are statistically more risky) pay more than not-young drivers.
Insurance companies will simply adjust the cost of insurance for self-driving cars to account for risk based on past data. If those cars will turn out to be involved in less accidents, the insurance will cost less. More accidents => cost more.
Basically Google can do the same for auto insurance that Amazon has done for online retail. i.e. they can operate on razor thin margins that no one else will ever be able to match because they'll be operating on sample-based statistics and it will take them a while before they have a significantly large sample to properly price their product.