How it Works
To start with suppose the capacitor is charged to V0. It discharges into the inductor, which builds up a magnetic field as the current through it increases. Once the capacitor is out of charge, the magnetic field keeps the current flowing, causing the capacitor to charge in reverse. This reverse voltage reduces the inductor current until it stops. At this point the cycle begins again with the capacitor charged in the opposite sense.
The LC oscillator can also be described in terms of energy. Energy oscillates between the capacitor and the inductor being stored as an electric field in the capacitor and then as a magnetic field around the inductor.
Damped LC Oscillator
In practice there is some resistance in the circuit, which causes the energy to burn away as heat over time. Usually this resistance is undesirable, like friction in general, but if it is significant, the oscillator must be modelled as an LCR oscillator.
It's important to note that the LC frequency formula below does not properly apply to damped circuits, unless the resistance is small.
There are two distinct kinds of damped oscillator, with the borderline being known as "critical damping". Light damping occurs when the resistance is low. The system still oscillates but dies away. High resistance causes heavy damping (or overdamping). In this case there is no oscillation; any energy simply dissipates.
This is the frequency at which the LC circuit will oscillate if energy is put into it. Also, if you apply a voltage at this frequency to the circuit it will respond better than at any other frequency.
At the resonant frequency, the reactance of the capacitor is equal to that of the inductor. (See Impedance) This fact can be a handy way to work out the formula above if you have pen and paper but no textbook.
Where ω = 2πf
Parallel and Series Resonance
There are two main types of LC resonance: series and parallel.
To comprehend them, you must understand this. In general, capacitors "like" to conduct high frequencies, and dislike to conduct low frequencies. Alternatively, inductors like to conduct low frequencies, and dislike high frequencies. (See Impedance)
Figure 1 displays the classic parallel resonant circuit. Ideally, this "resonant tank" will conduct all frequencies to ground excepting it's resonant frequency. At resonance, it looks like an open circuit and conducts no current.
Figure 2 is a frequency plot of a parallel resonant tank as the frequency is swept from just below to just above resonance. As you can see, the current flow is at a minimum when the tank is in resonance (therefore the voltage drop is the highest across the tank.) As you can see, this type of LC circuit can be useful in applications such as radio, in which one specific frequency is desired. By setting the tank circuit to resonate at a certain frequency, you can effectively "drop" unwanted frequencies to ground and pass along the desired frequency. More on this later.
Figure 3 shows the Series Resonant tank. It does not conduct until driven at it's resonant frequency. Thus, at resonance, it acts as a short circuit and conducts maximum current.
As you can see from figure 4, at resonance, the series circuit is fully conducting. Again, frequency is swept from just beneath to just above resonance. Current flow is at a maximum during resonance, thus the low voltage drop. This circuit is especially useful in filter applications in which one specific frequency is undesired. The reverse of the parallel resonant circuit, it passes all frequencies but "drops" the undesired frequency to ground.
If you are confrazzled by now, especially by the seemingly upside down graphs, maybe figure 5 will help.
You may have noticed in the graphs a gentle slope instead of a sharp one. Does that mean that certain frequencies are not attentuated as much? Yes. That is the essence of "Q" or "quality" of a resonant tank. The sharper the slope, the higher the "Q." In most applications, a high Q is desired.
The LC circuit in action
In figure 6, we have an LC circuit put to use in a practical application. The AM radio. At the top we have the antenna (or our signal generator). Immediately below, we have a capacitor and a tunable inductor that make a resonant circuit. The inductance of the coil can be changed, thus altering the resonant frequency and tuning the radio. Any signal that is not of the resonant frequency is diverted to ground. However, if they are of the correct frequency, signals are passed through the diode and into the earpiece.
NOTE: The diode functions to clip the negative side of the AM signal so that it can be heard in the earpiece. It has nothing to do with the resonant tank circuit.