When the input voltage Vin is already close to the reference voltage VRef, the real comparator does not completely switch to the new state, as in the case of the ideal comparator...
The hysteresis is the difference in voltage at which the comparator changes from LOW to HIGH and at which it switches back fromn HIGH to LOW...
This has as a consequence that the comparator does not switch back immediately in case of a small change in the input voltage. Noise in the input voltage is "smoothed".
The difference in the voltage is called Input Offset Voltage Vio and the value is found in every datensheet.
For a LM311 you a typical value of a few mV. This is too little to observe in your experiments. However, by using feedback you are able to increase the input offset voltage...