An oscillator is an amplifier (a transistor as an amplifier) circuit whose gain is set to a very high value and a part of the output is fed into the input part (this is feedback).
The frequency of an oscillator is controlled by means of tuned, or resonant, circuits. These are usually inductance-capacitance (LC) or resistance-capacitance (RC) combinations. The LC scheme is common at RF; the RC method is more often used for audio oscillators.
The tuned circuit makes the feedback path easy for a signal to follow at one frequency, but hard to follow at all other frequencies. The result is that the oscillation takes place at a predictable and stable frequency, determined by the inductance and capacitance or by the resistance and capacitance.