One type of electric motor is a servo. Servo motor is used to make mechanical robotic or automated devices. Servo work based on the frequency signal from the controller (such as a microcontroller or arduino).
SG90 Tower Pro servo motor can also be controlled by a ruspberry pi.
You can plug this SG90 Tower Pro Servo straight onto the raspberry pi GPIO pins 4,6,8 without some extra wires. Pin 8 on the raspberry pi is normally the UART Tx pin, so your SG90 Tower Pro servo will not work properly if you connect it without disabling the UART before running the main program, You can search the instructions for how to disabling the UART on pin 8 from google.
Each servo motor cables have different pin configurations. Tower Pro SG90 servo has a three-pin cable. Red cable is wired VCC. Black/brown cable is a ground cable. While the orange cable is a signal cable.