The drive motor rotates the motor shaft, which in turn rotates the idler pulley, which rotates the drive belt that's wrapped around the dryer drum. The motion of these components causes the drum to rotate during the cycle. The drive motor also rotates the blower fan blade on most dryers.
A failing drive motor may shut off in the middle of a cycle. Some dryers will restart automatically when the motor cools, but others require that you restart them. Replace the drive motor if it overheats.
The wire harness connections on the motor can be repaired, but the internal components on the motor cannot. If the drive motor doesn't run when voltage is applied to it, replace the drive motor.