How it works:
You have 4 transistors, wired as ON OFF switches. Two signal lines allow you to run the motor in one direction, when reversed, the motor runs in the other direction. It's very straightforward to use and build, but be careful to use only small motors, as the currents drawn from the bigger types can burn your components.
There are 3 modes of operation:
Both equal ( on or off ): motor doesn't run, as it's shorted or not connected
S1 on, S2 off: motor runs in reverse ( from negative [blue] to positive [red] )
S1 off, S2 on: motor runs normal.
Also note, unless you use power transistors, you need to connect diodes across the transistors in order to protect from overvoltages.
Simplified schematic:



