The work done by the net force on an object is equal to the object's change in kinetic energy.
When a car stops after the breaks are applied, the loss of kinetic energy is equal to the work done by the force of friction.