Capacitor in circuit for potentiometer?
The capacitor filters noise, making the voltage at V0 more stable. A capacitor resists changes in voltage. The rate of change of voltage, current, and capacitance are related by:

$$ I = C \frac{\mathrm{d}v}{\mathrm{d}t} $$

The larger the capacitance, the more current required to make a change in voltage. Since there is only so much noise current, the more capacitance, the less the voltage noise.

Possible sources of noise:


electromagnetic interference
thermal noise
noise from the wiper sliding in the potentiometer
noise from the power supply
leakage currents from other digital IO


Another way to view it: the capacitor and resistor together make a low-pass RC filter. This attenuates higher frequencies, while not attenuating the lower frequency. Since you are interested in the nearly constant voltage selected by the potentiometer, and the lowest frequency is a voltage that doesn't change at all, this is good.