A sine wave is a pure tone, while a square wave contains the pure tone and a series of harmonics.
Here you can see what happens if you play a square wave with the sample rate set to 44.1 kHz. The overtones above the Nyquist frequency gets folded (aliased) back.
View attachment 43820
Here's a more practical example of what happens (in this case, a square wave).
From 2:02.
This is at least what happens in the digital domain. I suppose converting the square wave from digital to analog would make the frequency range of the speaker determine the highest harmonic it can produce.
There are probably other factors which I am not that aware of that also affects the analog signal (I am not an electrical engineer, so Google will provide better answers).