A DC motor is a type of motor which as the name suggests run on direct current. The DC motor which we use properly runs between 9V to 15V(may vary according to size).For connecting your Raspberry Pi with your motor you need an IC called L293D.Its is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors.For the steps visit
http://learningembedded.com/beaglebone/beaglebone-motor-interfacing/
http://learningembedded.com/beaglebone/beaglebone-motor-interfacing/