Managing engines via usb ,using Arduino

I'd like to know how can I write program

Use the Arduino IDE.

What specific libraries do I need ?

The Servo library would be a good one to use. Other ones would depend on what the servo is moving in response to, and/or what it is moving.