It is possible to create a sin wave if given a square wave. You see, mathematically any waveform can be made of of an infinite amount of smaller sin waves.
If we feed the wave though a low pass filter tuned to the frequency of the square wave, we can get a sin wave back out. The problem we face now is filters, at least the simple ones, don't have a sharp dropoff, so some of the harmonics get through.
We can fix that by using a series of LPFs, because the dropoff increases with each additional filter.