I'm not entirely sure if I understand what you're asking, but I'll try my best to answer it.
If you want your motor to simply go full power or off, then you can merely use digitalWrite(#, HIGH); or digitalWrite(#, LOW); where # is the pin # you are outputting on the Arduino.
For the pins of the arduino that are labeled as PWM pins, you can declare them as outputs and merely use the analogWrite(#, #); The first # is the pin that you have it plugged into and the second # is an integer from 0 to 255. The PWM will be variable speed.