In general, oscillators can be thought of as devices that continuously convert energy between two forms. The oscillation they perform is the oscillation of energy between two forms. In the particular case of electric oscillators, this conversion of energy produces a repetitive electronic signal.
A pendulum can be thought of as a very basic oscillator that converts between kinetic and potential energy. Though the pendulum(& the energy conversion) would stop after a certain time interval, we may keep it going by providing some external energy.
Similarly, a tank circuit is an oscillator that converts between electrical and magnetic energy & keeps going until all the energy gets dissipated by the resistor. The electric signal generated has a frequency equal to the rate at which energy switches between the two forms.