Hypothetical:
Car value $10,000
Loan balance $4,000
Salvage value of the car $3,000
Collision Deductible $500
Insurance pays $6,500 and lets you keep the car. $4,000 to the bank and $2,500 to you.
You keep the damaged car and the $2,500 and do what you want with it.