A quartz oscillator is very similar to a tuning fork. In fact, they're mechanical just like a tuning fork. With a tuning fork, you hit it on something hard and it resonates according to the material, dimensions, etc. A quartz crystal is "hit" with a pulse and it in turn produces a pulse as the crystal flexes back into resting state. This is coupled with a feedback loop and some amplification. The physical properties of the quartz crystal inside the oscillator determines the resonant frequency.