OK, I'm going to try showing this with pictures, then.
First, one of the gears that transmits the power:
http://rebrickable.com/parts/6542Ignore the teeth on the one face, when the image rotates around to show you the inside, look for the triangle-shaped teeth on the inside. Also notice how the inner part of the gear is smooth, so it does not grab the shaft it is riding on. It just slides over it, so the shaft can stay still while the gear spins.
Next, the slider:
http://rebrickable.com/parts/6539Note that it has splines on the inside, so it rotates with the shaft it is on. And the teeth it has on the front and rear ends will catch on the teeth on the inside of the gear above. When they do that, the gear is now locked to this slider, which is locked to the shaft by the splines.
All of the other gears, though, are still freely-spinning on the shaft. They aren't locked to the shaft at all! (Unless you slide one of their sliders too, in which case the shafts stop turning because they are trying to turn at two different speeds at the same time!)
The sliders are in grey in the following picture instead of red, so they're a little harder to see. But the gear shift lever (the part with the blue cone on top) has a flat end that can push the slider forward or back, and have the slider engage the gear to its front or to its rear.
I hope this helps make some sense out of how that thing works!
Oh, speaking of "how stuff works", here is their article explaining it:
http://www.howstuffworks.com/transmission.htm--DD