The basic difference is that a sine wave is only a single frequency, but a square wave is actually made up of the fundamental frequency plus odd harmonics. So for example a 50Hz square wave isn't just 50Hz, but also 150Hz (3 x 50HZ), 250Hz (5 x 50Hz), 350Hz (7 x 50Hz) etc.
Amplitude decreases as the harmonic number increases, but may still be significant out to the 10th harmonic and beyond.
The other factor involved is the response of the human ear.
The ear is less sensitive to lower frequencies, and this gets worse as the sound level decreases. Below the threshold level you won't hear any sound.
With a square wave, the human ear's increased sensitivity at higher frequency more than makes up for the reduced amplitude of the harmonics. At ~25 dB SPL you may be able to hear the harmonics of a square wave whose fundamental frequency is below 100Hz, when a sine wave of the same frequency and amplitude is inaudible.
I connected output (50Ω) of function generator to 35 watt 5Ω speaker.
If you connected the generator directly to the speaker (without an amplifier in between) then the sound output will be very weak because:-
a) function generators are designed to produce a low power signal (typically 0dBm or 1mW) not drive a high power speaker.
b) there is a large mismatch between 50Ω and 5Ω, which greatly reduces the amount of power transferred.
c) the speaker also has a frequency response which drops off below its resonant frequency, and its impedance varies with frequency so when driven by a high impedance the frequency response is less flat.
All this means is that to get a good sound level you need to put an audio power amplifier between the generator and speaker.