The electronic stability control system doesn't work all alone -- it uses the car's other safety and regulatory devices, like anti-lock braking and traction control, to correct problems before they become accidents.
The center of the ESC system is also the center of the car: the yaw control sensor. It's almost always located as close to the very center of the car as possible. If you were sitting in the driver's seat, the yaw control sensor would be under your right elbow, somewhere between you and the passenger.
But what the heck is "yaw?" If it sounds like something a pirate would say, that's because they probably would. Ships and cars both experience yaw, which is a movement around a vertical, or z, axis. It's as if the car were pinned like a butterfly in a display case, where the pin is the z axis. The yaw sensor is right at the center of the pin. If the ESC system detects that the car is swinging too far (or not far enough) around that up-and-down axis, it springs into action to assist.
Using all the modern electronic systems at its disposal, the ESC can activate one or more individual brakes, depending on which wheel can increase driving safety the most, and control the throttle to lessen the speed at which the car is traveling. The sensor is looking for differences between the direction of the steering wheel and the direction the car is headed; the car's computer then makes the necessary corrections to bring the vehicle's direction of travel in line with what the driver wanted.
To find out which components electronic stability control has at its disposal, keep reading.