State laws and insurance guidelines differ but normally if your car has been declared a total loss the check will be made out directly to the insured and the lien holder. If the settlement check for the actual cash value (ACV) of the car is more than what is owed on the vehicle you should get money back out from the settlement amount once the loan has been paid in full.
When you have a lien holder, and thus are not technically yet the full owner of your car, settlement checks or checks for repairs or a total loss are normally made out to both the policyholder and the financial institute, lender, which holds the title to your car. The lending institutes's name is on the check because your car is collateral for your loan. The bank (or whoever is financing the car) has an interest in making sure the money is used to repair the car and not for anything else. In case of a total loss the lender makes sure the money is used to pay on the loan.
An insurance company will typically notify the lien holder if they are going to write a check to make the insurable interest (vehicle) whole. Since both the lien holder and the insured driver have an interest in the value of the vehicle, normally they are both notified about physical damage claim reimbursements of any amount.
Thus to protect the lien holder's interest in the vehicle, many insurance companies will cut the settlement check in both your name and an additional payee which would be the lien holder. If your vehicle has been totaled out and you want to know about the settlement check, speak to the insurance adjuster about how the check will be cut.