system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do the differences between 91, 95 and 98 unleaded petrol effect a car? I’m trying to understand the physical differences happening between them in a car that can use all 3.
gpt
Octane in fuel changes its ability to withstand compression without detonating/preignition. Detonation at the wrong time in gasoline engines is bad*, because you’re getting combustion (and therefore, expansion force) of the fuel charge at the wrong time - when the piston and crank aren’t in the right position). This is both inefficient (you’re burning fuel that isn’t actually used for motion), and destructive. When combustion happens at the precise millisecond the piston and crank are ready, there’s no damage, because the piston is at/just past the top of its arc, and down is the path of least resistance. When combustion happens before this point - especially when the piston is moving upward - the path of least resistance is to eventually blow holes through the cylinder walls, piston head, or cylinder head. 

Higher octane fuels withstand higher compression in the combustion cylinders without detonating. This is useful, because higher compression means you can pack more  fuel+oxygen molecules into the same volume in the cylinder without it igniting before the spark plug fires, leading to higher power output potential (and, to a certain extent, higher efficiency). 

Engines that specify low-octane fuels are relatively low in compression, so they are much less likely to have detonation issues. They run on higher-octane fuels without any effect, negative or positive. 

Engines that specify high-octane fuels have relatively high-compression, and they need a fuel with detonation resistance - the octane - to run at their most powerful and highest efficiency. When you give a high-compression engine low-octane fuel, you’ll get detonation, but the effect is compensated for using *knock sensors.* Knock sensors listen for the particular sound of detonation/preignition - knocking and pinging - sending the signal to the engine management computer, which adjusts things like fuel/air ratio and spark timing to stay one step ahead of the detonation. The trade-off is lower power and reduced performance.

Basically, no compensation is needed moving up in octane vs. spec, but compensation is needed when moving down in octane vs spec. All modern vehicles have knock sensors, even those with low-compression engines, as a way of compensating for varying fuel grades and octane availability. 

>*Not so with diesels, where detonation from compression is actually their means of combustion.