There are two times when a capacitor might be used that I know of:
1. A noise reduction capacitor (often with series resistor) across the mains to reduce electrical noise from a commutator/brush AC/DC motor. Used in electric drills.
2. A capacitor on a split phase capacitor start induction motor. The capacitor start field is usually switched out once the motor gets up to speed.
When the motor starts, the start capacitor (if used) is dropped out from the start winding via a start relay (either a current relay or potential relay), the run capacitor stays in the circuit, connected to the start winding only. It continually feeds small bursts of voltage to the start winding during the entire running of the motor. It helps make a motor operate with a bit less amperage, making it a bit more efficient.
The purpose of the capacitor is to provide approx. 90 degrees phase shift between the current (and hence magnetic field) in the start winding compared to the run winding. This gives a rotating magnetic field to drag the rotor (central rotating part of the motor) in one direction of rotation.
In a capacitor start motor, the capacitor is an AC electrolytic type, and is switched out once up to speed, to extend its life.
In a capacitor run motor, there are two capacitors, a large valued AC electrolytic type and a small valued non-electrolytic type, in parallel. Once up to speed, only the electrolytic type is switched out, leaving the smaller capacitor to improve performance and power factor.