An Electronic Stability Control (ESC) system attempts to prevent a vehicle from spinning or sliding by applying the brakes to the necessary wheels to try and correct an inadvertent loss of traction.
It makes use of an Anti-lock Braking System (ABS).
One example of where this system will kick into action is in the case of understeer.
Understeer generally occurs when a driver attempts to take a corner too quickly and the car is unable to turn as sharply as the driver intends which causes the front wheels to start skidding towards the outside of the corner.
In this situation the ESC system will attempt to correct the slide by applying the brake to the inner rear wheel which hopefully allows the other wheels to regain traction and allows the car to steer towards where the driver intends.
Another example is oversteer.
Oversteer is similar to understeer in that it is brought on by a driver attempting to take a corner more quickly than the car is able to handle, but in the case of oversteer the rear tyres break traction first which causes the rear of the car to start skidding towards the outside of the corner.
An ESC system will try to prevent this by applying the brakes to the outer front wheel.