This is your 389 question in 4+ years. It looks like this field is too challenging for you. But I will bite.
The circuit is a resonance tank with resonance frequency ~8 kHz, with a slight damping [sorry, not dumping nor demping] due to 33k resistor. The resonance function is a sharp decaying function on both sides of the 8kHz peak. Try to apply AC analysis function in the LTspice, (.ac dec 100 1 100000), to see its shape.
The output of first signal is NOT A SINUSOIDAL FUNCTION, it just looks pretty similar. The 10 kHz square wave is a bit above the resonance frequency, so the base harmonics is only slightly (I mean only 50X :-) attenuated, while all upper harmonics (third, fifth, etc.) are strongly attenuated by this sharp filter transfer function, with phase shifted, etc. That's why the output mostly contains the first harmonics, and looks like a sinusoid.
In second case the signal is way below the resonance. Since you are using an ideal pulse with no edge limit and therefore with infinite bandwidth, the ~801-th (or so) harmonics of the square wave gets into the circuit's resonance, and it "rings". If you would play with some deviation from 10 Hz, you will see different ringing amplitudes.
ADDITION: Yes, the square (10Hz) waveform can be expanded into Fourier series of sine functions, all with CONSTANT COEFFICIENTS (amplitudes). In this sense, this input signal does contain some small-amplitude continuous sine wave at about 8kHz. If one can build a perfect single-frequency filter, he/she would see a continuous sine wave. However, the simple LC is very far from the ideal single-frequency filter, and passes many other harmonics as well. The trick is that just as the input signal can be viewed as a SUM of all sine waves (with proper amplitudes), the output signal is also a SUM of all frequencies it passes. So the SUM of frequencies filtered by your simple LC filter gives you the waveform you see, and not a constant sine wave as you might expect.