when the switch is in position 1 (to the source) the Capacitor is charging to maximum voltage of 5V,when we switch the switch is in position 2, the inductor is being inducted and after the capacitor discharges fully the inductors magnetic field will create a AC current that will slowly decrease untill the sine wave flats out (look at position two the wave should be there), it really cant be called a oscilator but its just basically how it works, it can be further improved with resonating circuits and amplifiers