Very basic--how to turn DC motor on and off?

I'm an absolute beginner, and I'd like to know how to set up a circuit and program my Arduino to run a small DC motor (from a Knex toy) and just turn it on and off repeatedly, with delays (I don't need to control it, just turn on and off every second or so). Can anyone help?

Sure, take the blink with delay code, run pin to a 150 ohm resistor to the base of an NPN transistor. Connect the emitter to ground. Connect +5 to one motor lead, connect the other lead to the transistor's collector.

When pin13 goes high, the motor will turn on. If 5V is too much, try 3 AAs, or 2 AAs. Or 1 AA. Depends on the motor.

Hey stop cross posting!!!!

Yes, please only ask once. I am locking this one.