Concept:
An oscillator is a circuit that produces an output waveform without an external input signal.
Step 1: It uses a DC source as the energy supply.
Step 2: Through feedback, the circuit maintains continuous oscillations.
Step 3: The output waveform may be sinusoidal or non-sinusoidal.
Therefore, the basic function is:
\[
\boxed{\text{Generate alternating waveform}}
\]