For instance, when you build a treaded vehicle
(in Dutch: rupsvoertuig, literally `caterpillar vehicle' -
presumably since the treads resemble this animal), such as a construction
you'd like one motor to control total motion, and the other
the turning. This construction does that: connect the treads to
the (A+B) and (A-B) axles, and the motors to A and B. Now motor
A makes the vehicle go forward or backward, and B turns it left or
right. Of course you can also run them simultaneously.
The great advantage is that you can now guarantee that the two sides of the treaded vehicle run at the same speed -- that does not happen with 2 motors, they always have a slight power difference. So it is more likely that it goes straight when you want it to. (Also, you could use a less powerful motor for the steering than for the driving, if you wanted.)
Another application is a crane, in which you need the same effect: one motor to lower/raise the bucket, the other to open the it.
When putting these three layers together (the "ON" arrows), you need to separate them by 2/3-height bricks. The "!!" arrow denotes one of those relatively 1-stud LEGO TECHNIC(r) bricks with an axle hole.
The above is for clarity. It can be made smaller; you find an example at Denis Cousineau's pages. Inspired by his challenge, I have minimized it even more, both in horizontal and vertical position. You really want to try and put all the gears in one plane.
You can also place it vertically, but I found I needed to use a chain to get the gears to connect properly. Here I drive it with the wormwheels on two side-by-side motors (red and blue).
Here's a LeoCAD file of the original device.