If your vehicle is declared a total loss your insurance company should, according to the New York Insurance Department, pay the actual cash value (retail value plus sales tax), which is subject to depreciation and applicable deductions, if your car is a total loss because it was stolen or damaged beyond repair, or replace it with a substantially similar car, in accordance with governing regulatory standards.
If you owe more than the actual cash value (ACV) of the car, are upside down on your loan, then you would owe the difference between ACV and the remaining loan balance. If you had Gap insurance it should pay the remaining balance to the lien holder. Without Gap insurance then you would owe this amount and need to pay it on your own, the insurance company would not be responsible for it since they have paid you what the car was worth.
While insurance laws may differ from state to state this is true most everywhere - that an insurance company will only pay actual cash value and if there is still money due on the car the person paying on the loan is responsible for that remaining balance.