If your car has been found to be a total loss due to a covered accident then you should have received actual cash value (ACV) from either the at fault's property damage liability policy or through your own physical damage coverages.
Once you receive ACV for the vehicle if you owned the car without any lien holder on it then you can take this money and look for a new vehicle. If instead you still were paying off the vehicle then the ACV may be enough to pay off the car or if you were upside down on your car (owed more than the worth of the car) then you would owe the difference between ACV and the balance of your loan.
If the ACV only paid off the car or left you still owing money on the vehicle you were still "made whole" by receiving actual cash value for your car so you would need to determine if you were going to purchase a new car with a new loan on it.
There are some states, such as Illinois that allow an insurance carrier to offer you a replacement vehicle instead of actual cash value for your totaled car. In IL the replacement vehicle must be comparable to your damaged or stolen vehicle: that is, the replacement is of the same manufacturer, same model year, similar body style, options and price range, in as good or better overall condition; and available for your inspection at a licensed dealer within a reasonable distance from your home.
So to find out if your state permits a replacement car instead of a cash settlement you can check with your state's insurance regulator. If this is an option in your state then check with your insurance company's claims adjuster that is working on your claim to find out if this is an option your insurance company offers.