if your car is TPFT and someone hits you and the car is written off you get to keep it, well depends on the insurance company but as it got explanded to me by mine one, because it is my car and they hit me, im claming from there insurance not mine, therefore the other company has no right over your property, they are mirly paying you for the loss of the car not the car it's self as it isn't worth repairing because of its value.
not sure where to stand with real smashed up wrecks, but would think same apply's.
if you are FC then your insurance pays you out and clames it back, they then take the car and sell it to a salvage company ( if it not to fucked i spose) or some insurance companys will sell it back to you depending on the damage, if its un safe, no chance, if its say all panle damage down on side etc then it still safe so your in with a chance