What your rental agreement typically covers if the car itself fails.
Most rental agreements include some form of roadside assistance for mechanical failures that aren't the driver's fault, and the rental company will usually either send a repair technician or swap the vehicle depending on the issue. Contacting the rental company's emergency line first, before any third-party towing service, ensures the cost is handled correctly.
Keep your rental agreement and the roadside assistance number easily accessible, since you'll likely need to provide agreement details when you call.