What does an oscillator do?

An oscillator, well, oscillates. It generates a continuous time-varying signal, usually a sinusoidal waveform, but it could be anything, such as a sawtooth, triangle, or pulse train.

The harmonic oscillator works by having some kind of amplifier sitting in a feedback loop with a tuned circuit, often simply an RC, RL, or RLC filter or crystal, and the output is a sine wave.

The relaxation oscillator works by having a capacitor (sometimes an inductor) coupled with a non-linear switch that periodically charges and discharges, and the output can be pulse, sawtooth, or triangle, as needed.