A variable resistor can be used with other components to vary a small DC voltage that when applied to a diode (varactor diode is made for this) will vary the capacitance of the diode. By varying the capacitance this way one can actually adjust the frequency of some circuits.
FYI - many/most diodes have a small amount of capacitance which is not always desired but which also can be exploited. The capacitance can be varied by the application of a small DC voltage. Varactor diodes are made for this purpose but I've seen general purpose diodes used - possibly being less predictable but like lots of other things, it works.