A PLL or phase-locked loop is a control system that generates an output signal whose phase is related to the phase of an input signal. It consists of three basic elements: a phase detector that compares the phase of two signals and generates an error signal, a loop filter that filters the error signal, and a voltage-controlled oscillator whose frequency is controlled by the filtered error signal. PLLs are commonly used in applications such as frequency synthesis, signal demodulation, and motor speed control.