How exactly to track oscillator in superhet receiver
There is not just one variable capacitor.  There may be one unit, but this unit contains at least two variable capacitors.  These are all mechanically activated by the same motion so that they always move together.  One capacitor adjusts the local oscillator frequency, and the other the center point of the RF bandpass filter.

Usually the front end filter is somewhat broad so that small errors in the tracking don't make much difference.  The main purpose of the front end filter is to eliminate image frequencies.  A product mixer produces both the sum and difference of the frequencies.  Working backwards, there are therefore two different RF frequencies that result in the IF frequency after mixing with the LO.  The job of the front end filter is to squash the other frequency, called the image frequency.