It will depend upon state laws what actually becomes of a car once it is determined to be a total loss however in general the insurance company takes possession of the vehicle and then sell it for parts, sell it to a junkyard for scrap or if it can be repaired sell it at an auction as a salvage vehicle.
If it is sold at an auction it will have a salvage title and in some states once the car has been repaired it will then get a rebuilt title to show that it is road worthy. If the car is sold to a junk yard it may be parted out or it may be crushed. It will depend upon the extent of the damages.
The monies the insurance company receives for the vehicle from an auction, junkyard, etc help offset the cost of the claim they paid out for the vehicle being declared a total loss.
State laws and insurance company guidelines will dictate what an insurance provider would do with a totaled car. You can contact your state's insurance regulatory body for state law information and your car insurance agent for information on what their procedures are for what they do with a vehicle once they total it out and take possession.