Why does an Oscillator produce sine waves?
Why does an oscillator produce sine waves?


Often, sine waves are the desired output, for example in a radio system where we want to only transmit on a specified frequency band. We actually have to work hard to design an oscillator that produces a pure sine wave output.

Generally, by fourier analysis, any repetitive signal can be seen as a sum of harmonically related sine waves. If what we want is a sine wave, then all the harmonic content is considered harmonic distortion, and you need to use careful design and/or output filters to remove it.


  I also know the principle of a square wave generator using op-amp, but that isn't an oscillator and works on the principle of saturation of op-amp. Am I correct in stating that oscillator and sq. wave generator are different ?


If it oscillates, I would still consider it an oscillator. Specifically, the op-amp circuit you're probably thinking of is a form of relaxation oscillator. Wikipedia even uses a diagram of an op-amp oscillator as the first illustration on their page on Electronic Oscillators.

Edit In reply to your comment, harmonic content is the content at frequencies that are harmonics (multiples) of the fundamental operating frequency. For example, from a 1 kHz oscillator you will get output at 1 kHz, 2 kHz, 3 kHz, etc.

The oscillator doesn't filter it out, but you can add a filter at the output of your oscillator to try to filter it out. 

If you want a sine wave output, you design the oscillator carefully to generate as little harmonic content as possible. But in general, no matter how careful you are, there will be some harmonics in the output. They don't die out over time, they are part of the output as long as the oscillator runs. Supercat's answer explains some of the reasons why harmonic distortion in the output is unavoidable.

Harmonic content is often undesirable, so you try to design your oscillator to not produce it, but there are no perfect components, so you are always stuck with some harmonic distortion in the output.