Yaw sensors keep track of the direction in which the car is moving relative to which way the driver is turning the steering wheel. When the sensors detect understeer or oversteer — conditions in which the car is not going in the direction the front wheels are pointed — a computer takes over and applies brakes or controls power to one or both of the drive wheels, so that the car comes under control.
The system is programmed to respond to a wide variety of scenarios and is so selective that it can apply only the brake on one specific wheel if that’s what is needed to regain control.
To one degree or another, the anti-skid systems used on other cars operate in much the same way. They have two or four yaw sensors, central processing computers that monitor steering.