Can you turn a square wave into a sine wave using a low pass filter?
To be able to analyze what a low pass filter does first you would need to understand what a Fourier transform is, hence some theory first.
The Fourier transform essentially represents the time-domain information stored in some function (a square wave in your case) in terms of frequencies.
A simple example would be a sine wave $sin(2\pi f_{c} t)$ which contains just a single frequency, $f_{c}$. In the frequency domain, after taking the Fourier transform, it produces 2 frequencies at $f_{c}$ and $-f_{c}$ (the negative value occurs because of the mathematical representation of the Fourier transform using complex exponentials, but nevertheless the positive frequency $f_c$ is what one would expect).
Sine wave frequency response http://www.gaussianwaves.com/gaussianwaves/wp-content/uploads/2013/12/Sine_wave_power_calculation_matlab_2.png?02772a
If you are clear with that, then let's move on to what a filter is. A filter modifies the input and generates some output from it and is often represented in the frequency domain =&gt; A filter modifies the Fourier transform (aka frequency spectrum) of an input. Basically, it may attenuate some parts of the frequency spectrum and magnify other parts, and may add a &quot;phase change&quot; (frequencies manifest themselves as complex numbers, and phase changes become relevant then)
Now, lets see what exactly a low pass filter does to a square wave.
A low pass filter can be understood as a filter that cuts-off frequencies above a certain threshold when applied to some input. High frequencies which correspond to rapid transformations in the time domain are removed from the input and only the lower frequencies remain.

(source: www.sfu.ca)
In the image attached above, the function on the left is a square wave and the one on the right is the magnitude plot of its corresponding Fourier transform (as mentioned before, the frequencies are actually complex numbers and the entire Fourier transform would be complete only with the addition of a &quot;phase plot&quot; as well).
Observing the magnitude plot, if one were to pick a low pass filter with cut-off frequency between that corresponding to bin #1 (1st harmonic: 100 Hz) and bin #2 (3th harmonic: 500 Hz), the other higher frequencies would get cut out and there would only be 2 frequencies that remain: -100 Hz and 100 Hz which would correspondingly represent a sine wave (as mentioned above).
Answer:
It is therefore viable to use a low pass filter to create a sine wave out of a square wave. However one is restricted to a sine wave with the frequency the same as the period ($1/f_o$) of the input square wave. Higher harmonics cannot be generated (a band-pass filter would be required for the same).
Image sources: google
EDIT: Thanks to @Matt for pointing out that the question says square wave and not rectangular function. Edited answer to reflect the same.