Unburned end gas, under increasing pressure and heat (from the normal progressive burning process and hot combustion chamber metals) spontaneously combusts, ignited solely by the intense heat and pressure. The remaining fuel in the end gas simply lacks sufficient octane rating to withstand this combination of heat and pressure.
Detonation causes a very high, very sharp pressure spike in the combustion chamber but it is of a very short duration. If you look at a pressure trace of the combustion chamber process, you would see the normal burn as a normal pressure rise, then all of a sudden you would see a very sharp spike when the detonation occurred. That spike always occurs after the spark plug fires. The sharp spike in pressure creates a force in the combustion chamber. It causes the structure of the engine to ring, or resonate, much as if it were hit by a hammer. Resonance, which is characteristic of combustion detonation, occurs at about 6400 Hertz. So the pinging you hear is actually the structure of the engine reacting to the pressure spikes. This noise of detonation is commonly called spark knock. This noise changes only slightly between iron and aluminum. This noise or vibration is what a knock sensor picks up. The knock sensors are tuned to 6400 hertz and they will pick up that spark knock. Incidentally, the knocking or pinging sound is not the result of "two flame fronts meeting" as is often stated. Although this clash does generate a spike the noise you sense comes from the vibration of the engine structure reacting to the pressure spike.
One thing to understand is that detonation is not necessarily destructive. Many engines run under light levels of detonation, even moderate levels. Some engines can sustain very long periods of heavy detonation without incurring any damage. If you've driven a car that has a lot of spark advance on the freeway, you'll hear it pinging. It can run that way for thousands and thousands of miles. Detonation is not necessarily destructive. It's not an optimum situation but it is not a guaranteed instant failure. The higher the specific output (HP/in3) of the engine, the greater the sensitivity to detonation. An engine that is making 0.5 HP/in3 or less can sustain moderate levels of detonation without any damage; but an engine that is making 1.5 HP/in3, if it detonates, it will probably be damaged fairly quickly, here I mean within minutes.
Detonation causes three types of failure:
1. Mechanical damage (broken ring lands)
2. Abrasion (pitting of the piston crown)
3. Overheating (scuffed piston skirts due to excess heat input or high coolant temperatures)
The high impact nature of the spike can cause fractures; it can break the spark plug electrodes, the porcelain around the plug, cause a clean fracture of the ring land and can actually cause fracture of valves-intake or exhaust. The piston ring land, either top or second depending on the piston design, is susceptible to fracture type failures. If I were to look at a piston with a second broken ring land, my immediate suspicion would be detonation.
Another thing detonation can cause is a sandblasted appearance to the top of the piston. The piston near the perimeter will typically have that kind of look if detonation occurs. It is a swiss-cheesy look on a microscopic basis. The detonation, the mechanical pounding, actually mechanically erodes or fatigues material out of the piston. You can typically expect to see that sanded look in the part of the chamber most distant from the spark plug, because if you think about it, you would ignite the flame front at the plug, it would travel across the chamber before it got to the farthest reaches of the chamber where the end gas spontaneously combusted. That's where you will see the effects of the detonation; you might see it at the hottest part of the chamber in some engines, possibly by the exhaust valves. In that case the end gas was heated to detonation by the residual heat in the valve.
In a four valve engine with a pent roof chamber with a spark plug in the center, the chamber is fairly uniform in distance around the spark plug. But one may still may see detonation by the exhaust valves because that area is usually the hottest part of the chamber. Where the end gas is going to be hottest is where the damage, if any, will occur.
Because this pressure spike is very severe and of very short duration, it can actually shock the boundary layer of gas that surrounds the piston. Combustion temperatures exceed 1800 degrees. If you subjected an aluminum piston to that temperature, it would just melt. The reason it doesn't melt is because of thermal inertia and because there is a boundary layer of a few molecules thick next to the piston top. This thin layer isolates the flame and causes it to be quenched as the flame approaches this relatively cold material. That combination of actions normally protects the piston and chamber from absorbing that much heat. However, under extreme conditions the shock wave from the detonation spike can cause that boundary layer to breakdown which then lets a lot of heat transfer into those surfaces.
Engines that are detonating will tend to overheat, because the boundary layer of gas gets interrupted against the cylinder head and heat gets transferred from the combustion chamber into the cylinder head and into the coolant. So it starts to overheat. The more it overheats, the hotter the engine, the hotter the end gas, the more it wants to detonate, the more it wants to overheat. It's a snowball effect. That's why an overheating engine wants to detonate and that's why engine detonation tends to cause overheating.
Many times you will see a piston that is scuffed at the "four corners". If you look at the bottom side of a piston you see the piston pin boss. If you look across each pin boss, it's solid aluminum with no flexibility. It expands directly into the cylinder wall. However, the skirt of a piston is relatively flexible. If it gets hot, it can deflect. The crown of the piston is actually slightly smaller in diameter on purpose so it doesn't contact the cylinder walls. So if the piston soaks up a lot of heat, because of detonation for instance, the piston expands and drives the piston structure into the cylinder wall causing it to scuff in four places directly across each boss. It's another dead give-a-way sign of detonation. Many times detonation damage is just limited to this.
Some engines, such as liquid cooled 2-stroke engines found in snowmobiles, watercraft and motorcycles, have a very common detonation failure mode. What typically happens is that when detonation occurs the piston expands excessively, scuffs in the bore along those four spots and wipes material into the ring grooves. The rings seize so that they can't conform to the cylinder walls. Engine compression is lost and the engine either stops running, or you start getting blow-by past the rings. That torches out an area. Then the engine quits.
In the shop someone looks at the melted result and says, "pre-ignition damage". No, it's detonation damage. Detonation caused the piston to scuff and this snowballed into loss of compression and hot gas escaping by the rings that caused the melting. Once again, detonation is a source of confusion and it is very difficult, sometimes, to pin down what happened, but in terms of damage caused by detonation, this is another typical sign.
While some of these examples may seem rather tedious I mention them because a "scuffed piston" is often blamed on other factors and detonation as the problem is overlooked. A scuffed piston may be an indicator of a much more serious problem which may manifest itself the next time with more serious results.
In the same vein, an engine running at full throttle may be happy due to a rich WOT air/fuel ratio. Throttling back to part throttle the mixture may be leaner and detonation may now occur. Bingo, the piston overheats and scuffs, the engine fails but the postmortem doesn't consider detonation because the failure didn't happen at WOT.
I want to reinforce the fact that the detonation pressure spike is very brief and that it occurs after the spark plug normally fires. In most cases that will be well after ATDC, when the piston is moving down. You have high pressure in the chamber anyway with the burn. The pressure is pushing the piston like it's supposed to, and superimposed on that you get a brief spike that rings the engine.