Insurance companies are obligated to pay in accordance with their policy provisions, which is usually the actual cash value of the vehicle at the time of the loss. This amount does not always cover the loan balance because you may owe more than the vehicle is actually worth. You would be responsible to pay the difference to the financial institution.
The idea of physical damage coverages (sometimes referred to as full coverage) is to make you whole if your vehicle is declared a total loss. They do so by settling for the actual cash value (ACV) of your vehicle in the condition it was before the accident.
If your vehicle is worth less than what you owe on its loan (upside on the loan) then the ACV will not cover your loan. On the flip side if the ACV is for more than what you owe then you would get the money over what the payment for your remaining loan amount is.
When you owe more on a vehicle then it is worth it is wise to obtain GAP insurance. This type of insurance policy pays the difference between the payout for a total loss of your vehicle and the balance of your loan. So GAP insurance would allow you to have your car paid off if it is declared a total loss and you are upside down on your loan.
If you feel as if your car is worth more than what the insurance company wants to settle for bring proof of the higher amount to the claims adjuster to see if you can negotiate a larger settlement.