Motor Circuit

In this circuit the diode is wired in parallel with the motor. The voltage comes from 5V, goes into the motor, and the motor goes into the collector of the transistor (left pin). The diode goes from the ground side of the motor to the positive side of the motor, with the black stripe on the positive side. The emitter of the transistor goes to ground.
The schematic also has a resistor going into the base of the transistor, from the Arduino pin. This is ideal with our small transistor to limit the current a little to the base. It says 220 ohm resistor, but your 330 ohm resistor should be fine.