In baseball, the tie goes to the runner; in insurance, the money goes to the loaner.
When you take out a loan to buy a car, the company that gives you the money is actually the legal owner of the vehicle that you now get to drive. Your name will be on the registration and on the insurance policy. However, they are the ones on the car’s title and listed as the lienholder on the insurance policy that you purchased.
Their listing as the lienholder on your car is what protects their interest in your vehicle. It also tells the insurance company that they are to be paid first in the event that your vehicle is a total loss. This is so that the money is used to pay off the money that you owe them on your car loan.
The only time you will see any money from a total loss, if you have a lienholder, is if the insurance company deems the vehicle to be worth more than what you owe to the lienholder. For example, if the insurance company determines that you vehicle is worth $5,000 and you owe $3,000, you would only receive $2,000 from the insurance company.
Even though you are out of a car, your loan (or at least most of it) will be paid off.