The car rental company has their own insurance for the car. If you damage the rental car during the hire period, you will be financially liable to pay for the assessed damage cost up to the excess value specified in your rental agreement with the car rental company only.
So for example, if the car rental company insures the hire car for $20,000, the rental vehicle excess component (capped amount) that you are liable for if you damage the car may be $4,000.
After the accident, the car rental company representative will assess the severity of the damage of your vehicle. If the vehicle sustained severe damage that is either beyond repair or makes it not safe to go back on the road, then your rental car is considered a write-off. If the cost of repairs is also higher than the insured value of your rental car, then they will declare it a write-off as well.