Higher-octane fuels have a higher "flash point"...that is, it requires higher temps to ignite.
Internal combustion 4-stroke engines are designed to ignite the fuel at the precise moment when the piston reaches the "power" stroke. Lower octane fuels would tend to ignite prematurely when the cylinder heats up in the compression stroke...this is called "pre-ignition", or detonation as dculkin described. This would sound like "pinging" or "knocking". Left unchecked, the end result will be pistons with holes blown through the top!
The emission control system in your car is also designed to work with specific parameters. If the lower-octane fuel forces timing adjustments that would degrade performance, the emissions control system would suffer as well. Too much retard on the timing, and the catalytic converter will be overworked, dealing with the less-than-optimum mixture at the exhaust manifold. Translation: overheated cat!
As dculkin also mentioned, newer vehicles have computer management systems that monitor this situation and adjust timing to avoid damage. But for older models, it's cheaper to just fill up with premium fuel than to risk a bottom-end rebuild...
2009 ML350 (84K) - Family vehicle
2001 CLK430 Cabriolet (71K) - Wife's car
2005 BMW 645CI (124K) - My daily driver
2012 Mustang V6 (60K) - Daughter's car