What happens if the insurance company "totals" the car, but you want to keep it?

Thanks to all, good information. My 'ol Corolla not involved in any fender-benders (yet), but was thinking what I’d do if it was, since it would almost certain be totaled by the insurance company; still I’d prefer to keep it even if it has a dent or two. As mentioned above, it doesn’t make sense to maintain collision insurance on a 20 year old car, so the situtation as described wouldn’t happen. There’s be no insurance pay out if the accident was self-caused on a car without collision insurance. But instead another driver scrapes up against your car and knocks off a fender. Then there would be an insurance pay-out. It looks like the best strategy – if there’s a payout and the car is totalled – is to seek out the highest insurance pay-out possible, then offer to buy the car back from the insurance company. Thanks to all for the info about the potential title and inspection/smog problem too.