( basically its when the fuel ignites before its meant to, and this causes mechanical problems with the way the engine works and stresses out the components.)
but here is a explanation courtesy of nissansilvia.com :
What is Pinging / Detonation ??
Detonation (also called "spark knock") is an erratic form of combustion that can cause head gasket failure as well as other engine damage. Detonation occurs when excessive heat and pressure in the combustion chamber cause the air/fuel mixture to autoignite. This produces multiple flame fronts within the combustion chamber instead of a single flame. When these multiple flames collide, they do so with explosive force that produces a sudden rise in cylinder pressure accompanied by a sharp metallic pinging or knocking noise. The hammer-like shock waves created by detonation subject the head gasket, piston, rings, spark plug and rod bearings to severe overloading. Mild or occasional detonation can occur in almost any engine and usually causes no harm. But prolonged or heavy detonation can be very damaging. So if you hear knocking or pinging when accelerating or loading your engine, you probably have a detonation problem.