OK, looking at the tags it looks like we're talking about a hard drive spindle motor. The easiest way is just to apply 5V and 12V to the molex connector and let it do its stuff. It will spin at 5400, 7200 or 10000 RPM - whatever it was designed for. If you're trying to make it run at other speeds with your own controller, then things get more difficult. Most HDD motors are 3 phase steppers so require sequential pulses on the 3 poles to operate. With a HDD motor you'll need to carefully control speed changes (especially on start-up) because of the inertia, so speed sensing and a closed-loop control system is required. Try to change too fast and it will just sit there juddering. There's some useful info and circuit HERE.