Program on/of motor dc??

i'm just for spinning motor on/off ... im using 12vdc (2400)rpm..