Question about controlling a DC motor

If you want to drive the motors with the ability to control speed/direction you need an hbridge (same circuit, just your supply would be 5v instead of 9v). If you just want to switch the motor on/off you can use a transistor and diode.

For the record, an hbridge is just a packaged circuit of a bunch of transistors, so if you want, you can make your own (it won't be as small, of course).