Gasoline octane ratings indicate the temperature at which the gasoline will self ignite - that's without a spark plug. The HIGHER that temperature is the higher the engine's compression ratio can be without preigniting the fuel, a/k/a "pinging".
Preignition occurs before the piston reaches the very top of its stroke so the too early explosion is against the still rising piston i.e. the engine is working against itself. On hot summer days you may occasionally hear a bit of pinging, even with 92 octane due to the engine's somewhat higher than normal temperature. In the winter you may get by with medium grade fuel.