As a slight aside, I thought I should amplify Tony Stewart's comment.
The circuit you're looking at is perfectly fine in principle, but it cannot be used for any but the smallest motors.
Put it this way - in order to get much current (and therefor much torque or power) from the motor, you need the voltage to be as close to 5 volts as possible. This means that the voltage across the transistor (Vce) must be as low as possible, and certainly less than 1 volt. In addition to this obvious issue, keep in mind that the power dissipated in the transistor is the product of the voltage (Vce) and the current (mostly collector current).
This is perfectly possible, but there are limits. The most important is that, when the transistor is being operated with very low Vce (less than a volt, typically), its gain drops significantly. The general rule of thumb for this condition, called saturation, is a gain of 10 to 20, where you've got a choice of exactly how optimistic you want to be. The conservative value is 10. At this value, you can expect Vce's of about 0.2 volts or so - as long as you respect that this implies a specific current level.
Now look at your circuit. If pin 9 has a maximum voltage of 3.3 volts, the voltage across the base resistor will be about 3.3 - 0.6 volts, or about 2.7 volts. The 0.6 comes from the base-emitter voltage drop. 2.7 volts divided by 10k gives a base current of about 270 uA. Driving the base with this current gives a maximum collector current of about 2.7 mA, or 5.4 mA with a saturation gain of 20. If the transistor is fully "ON", Vce will be about 0.2 volts. So the maximum power available for the motor will be about 4.8 volts times 2.7 to 5.4 mA, or something on the order of 13 to 26 mW. Just as a reference point, 1 horsepower is about 750 watts, so you're talking about 17 to 34 micro-horsepower.
This is hardly useless; you can spin a little indicator just fine with a low-power motor. It's just that you won't be able to make (for instance) any sort of vehicle, nor will you be able to lift much in the way of loads with a pulley.
If you do want actually build your circuit, what do you need for a motor? It will need to be rated for 5 volts or more, with as close to 5 volts as you can find. Buy yourself a cheap DMM (digital multimeter) for 10 to 20 bucks and measure the resistance of the motor. It will need to be on the order of 900 to 2k ohms or greater. Resistance equals voltage over current. 4.8 volts divided by .0027 to .0054 will give you the numbers (remember that we were talking mA, not amps).
Obviously, you can get more current by driving the transistor harder, and you do this by reducing the base resistor. However, be aware that at some point the Arduino will not be able to drive enough current from pin 9, and the voltage at the pin will start to drop. You should be fine with reducing the resistor to 1k, and possibly to the vicinity of 330 ohms or thereabouts, with a consequent increase in transistor (and motor) current. I encourage you to investigate this in a systematic way. When you do, also check the temperature of the transistor on a regular basis. 2N3904s are not high-power devices, so don't be surprised if it gets hot. Fortunately, they are also really cheap, so don't get too paranoid about burning a few out.
In the worst case, you will learn about Magic Smoke. Did you know that transistors actually work by magic? At the center of each transistor is a little pocket of Magic Smoke. If you let the Magic Smoke out, the transistor will stop working, and this proves that the Magic Smoke made it work.