I'm building a project which will require me to vary the amount of voltage reaching a 12v pump. I'm assuming that I can do this using a TIP120, as shown below (initially this will be a little manual circuit, without the complication of an Arduino):
Then, when I come to iterate up to Arduino control, I pull out the potentiometer, replace it with a pull-down resistor and on to an arduino PWN pin.
If you use an analog input for the transistor, it might get very hot.
PWM is just on or off, that prevents it from getting hot.
Your circuit will work with the potmeter and 9V.
But an output of the Arduino is HIGH +5V. So the motor will never get 9V.
To control it with an Arduino, you better place the motor at the collector of the transistor. And the emitter at ground. A pull-down is not needed, but you need a resistor from the Arduino to the base of the transistor.
The protection diode can be placed as a flyback diode over the motor.
The flyback or snubber diode should be the other way around.
A flyback diode is for an inductive load, and is parallel with the inductive load.
For a motor, the voltage could not only give a high voltage peak (inductive), but also be negative (dynamo).
To be sure, I would place both diodes, like in this picture I found elsewhere in the forum:
Even using PWM, unless the pump takes less than and amp or so, the TIP120 is going to get hot because of its high voltage drop. Much better to replace is with a logic-level mosfet. Then you can also eliminate the diode in parallel with the transistor (but you still need the one in parallel with the pump).