Knocking (also called knock, detonation, spark knock, pinging or pinking) in spark-ignition internal combustion engines occurs when combustion of the air/fuel mixture in the cylinder starts off correctly in response to ignition by the spark plug, but one or more pockets of air/fuel mixture explode outside the envelope of the normal combustion front.
The fuel-air charge is meant to be ignited by the spark plug only, and at a precise time in the piston's stroke cycle. Knock occurs when the peak of the combustion process no longer occurs at the optimum moment for the four-stroke cycle. The shock wave creates the characteristic metallic "pinging" sound, and cylinder pressure increases dramatically. Effects of engine knocking range from inconsequential to completely destructive.