When it's turned on it does many things. It will reduce wheel spin when accelerating, if the car begins to slide, it applies brakes to whichever wheel will help reduce the slide and when coming out of a slide, it limits the amount of power put to the drive wheels so you don't continue to slide.
In sport mode, which is when you hit the button once, it reduces all of those affects.
When you hold the button for 5 seconds, it turns completely off and none of those affects are applied.
Traction control/electronic stability control do many different things and I would suggest reading more into if you're interested.
http://en.wikipedia.org/wiki/Electro...bility_control