Cars that are stolen and wrecked or after they have been paid out by insurance end up with salvage title upon recovery. Cars in natural disasters will often end up as salvaged titles as well (floods, hurricanes, hail storms, etc.)
Titling a salvaged car initially is a matter or restoring to roadworthy condition and proving this to the inspection station who examines and tests the vehicle. If the car changes states, then you have to document what caused the salvaged title and money to restore to road worthy conditions has been my experience.
If you wreck a salvaged car, insurances love to turn into small furry rodents called weasels who will do everything in their power to not pay or downgrade the value of the vehicle.