You begin with a voltage controlled oscillator (VCO). Here's one that might be tunable between 600 MHz and 700 MHz: -
And let's say you want it to be exactly 640 MHz.
What you can do is divide down the output frequency using digital dividers like this: -
Each stage can reduce the output frequency of the VCO by 2 so, you string (say) 6 of these stages together to divide the nominal 640 MHz down by 64 to a nominal value of 10 MHz.
Then you have a crystal controlled oscillator running at exactly 10 MHz and you use some digital logic circuits to compare this exact 10 MHz with the nominally 10 MHz signal you have made from the output of the VCO.
It's a called a frequency phase detector: -
Refclk is the precise 10 MHz clock and fbclock is the divided down frequency from your VCO. This circuit produces two lots of pulses, up and down and these can be fed (via transistors) into a low pass analogue filter and analogue amplifier to produce a control signal.
That control signal then feeds the input of the VCO.
What theoretically happens next is a metric ton of math but the usually, the VCO is driven by the control signal to produce exactly 640 MHz - any error gets detected by the frequency phase detector and this produces a small change in the analogue signal that corrects the VCO.