I’m sorry to hear about your accident!
Insurance companies determine this by sending a claims adjuster to look at the vehicle and get an estimate for repair costs, as well as labor and parts fees. Contrary to popular belief, deployed airbags are not solid indicators of a total loss unless the cost to replace them is more than the car’s value.
If you are leasing or financing your car, then you will have to inform the lender. The leasing or finance company will receive the pay out to cover your loan balance. Anything leftover will be yours to keep or any remaining loan balance would be your responsibility to pay.
You may also have a buyback option, which allows you to purchase the vehicle from the insurance company after it’s “totaled out” and pay out of pocket for repairs to make it driveable.