Detonation
Detonation is a problem caused by competing flame fronts in an internal combustion engine, only one of them is created by the spark plug, the other is undesired. The entire fuel charge of the proper octane is supposed to wait until the spark plug fires. When the charge is ignited out of time and elsewhere in the chamber a separate and undesired flame front is created. These competing flame fronts create a loud knock in the engine when they collide, which is why so many call detonation "ping or knock".
There is a difference, mostly it's about when the when the flame front started and how it propagates or travels through the chamber. Preignition is when a flame is ignited in the combustion chamber before the spark plug fires. It is usually caused by hotspots and reveals itself as a slight knocking heard during acceleration at normal operating temperatures. Knock occurs when the peak of the ignition process does not or no longer occurs at the optimal moment in the engines timing.
Most engines have a knock sensor that along with the PCM retard the timing to prevent this hazardous condition. This condition raises cylinder pressures, the competing fronts collide creating this audible knock that resonates down the piston through the bearings and onto the crankshaft. Ouch!
There are several causes for these conditions and most have to do with temperature and timing. There are also other factors to think about: has the engine been modified or have there been any changes to the ignition timing recently. Has the customer used a different fuel, a fuels octane rating has a lot to do with it's ability to resist early or preignition. Check for TSB's in case of any inherent issues with the make and model you are diagnosing. During the late 1970's the manufacturers decreased the compression and redesigned their engines in an attempt to improve emissions and reduce quench areas that left unwanted hydrocarbons in the exhaust. We are grateful to report that due to a better understanding of the combustion process we have returned to high compression/high performance engines.