function of phase locked loop

The PLL is composed of the following blocks
The reference signal is obtained often from a quartz, with a very accurate frequency.
A phase detector compares the phase of the reference signal and the generated signal from the VCO.
A loop alter follows the phase detector to limit the bandwidth of the loop and extracts the phase-error from XPD. Several types of filters (active or passive, analog or digital, with various orders), condition the dynamic of the system.
The input voltage of the VCO controls the generated frequency at the output of the oscillator.
The output of the VCO is fed back to the phase detector, sometimes after a frequency-divider stage. The frequency divider is optional but it gives the possibility to generate an output frequency proportional by a factor N to the reference frequency.