Although Electronic Stability Control can be activated in a variety of driving scenarios, it is most useful during sudden swerves. For example, if you need to make a quick lane change to avoid a deer, ESC will help you move out of your lane. Crucially, it also helps you centre your vehicle after doing so. In addition, some situations require you to disengage ESC.
Traction control is a relatively simple technology compared to a full stability control package. It only prevents loss of traction at the drive wheels in cases where engine power exceeds the level of road surface grip. The only data the traction control ECU obtains about the car is how fast it is going and how fast the wheels are spinning. If you're trying to get your car out of deep snow, you don't want the stability control to apply the brakes.
So much so that grateful governments have made it illegal to sell new cars without stability control systems as standard. Of course, stability control has some caveats: although the systems are a feat of engineering that use more computing power than it takes to send men to the moon, they can't stop you from parking in a tree if you decide to overstep the immutable laws of physics. Stability control is a comprehensive set of technologies that includes traction control, but also a series of complex programmes designed to keep the car stable and under control, regardless of road conditions or driver clumsiness. That's exactly what traction and stability control systems do every time you get behind the wheel: they're better than you in tricky situations, which is why it's never a good idea to switch off traction control on the road.
These seem like fairly simple parameters, but the way stability control programmes work is quite extraordinary. Most vehicles allow only traction control to be switched off, and in some cases it is possible to disable stability control altogether. However, the stability control is prepared for your antics and will intervene again, braking individual wheels to prevent the car from skidding out of control and keep it pointed in the right direction. However, with a well-designed traction control system, you will almost always be quicker if you leave it on, especially with the multi-setting traction control modes common among high-performance cars.
If you read car magazines or watch Top Gear, switching off the traction control is a kind of male entitlement, like vomit coming out of your nose, but in real life you'll wonder why the button is included to do it. It all starts with an Electronic Control Unit (ECU), plus a series of sensors scattered around the car that measure how fast the wheels are spinning, how fast you are going and how far the car is turning around its centreline, plus a number of other variables that can include how far you have turned the steering wheel and even how quickly you have let off the accelerator to press the brake pedal. Traction control only works on the driven wheels, so if you drive a rear-wheel drive car, it will only work on the rear wheels. Although traction control systems use the same methods as stability control, their capabilities are much less.