What will happen if the vehicle is declared as total loss?

If there is no loan, you have to name transfer the vehicle to the insurance company name and they will provide you with the settlement amount (sum insured) after depreciating as per company procedure. For bank loan, it will be settled to the bank whatever the amount of settlement, remaining amount should be paid by the insured, if any.