Octane is a measure of a gasoline's ability to resist knock or pinging noise from an engine. In older vehicles, knock may be accompanied by engine run-on, or dieseling. Knock is the sharp, metallic-sounding engine noise that results from uncontrolled combustion. Severe knocking over an extended time may damage pistons and other engine parts. If you can hear knocking, you should have your engine checked to make sure it is calibrated correctly and does not have a mechanical or electrical problem, or use a higher octane gasoline.
In most vehicles no benefit is gained from using gasoline that has a higher octane number than is needed to prevent knock. However, in some vehicles equipped with a knock sensor (an electronic device installed in many modern engines that allows the engine management system to detect and reduce knock), a higher octane gasoline may improve performance slightly.
So if the engine is not knocking, whether from the engine management system or from a higher octane, where does the damage come from? The only thing I can see is less performance.