This is a great little example to use the Serial Monitor to control the position of a servo motor. Upload this code to your Arduino and use the Serial monitor to send the desired angle to control.
Connect the three wires of the servo motor up to your Arduino.
Red wire --> 5V
Black wire --> GND
White wire --> pin 9 (arduino)