"If the gasoline in an engine burns (combusts) prematurely (in terms of mere milliseconds), or combusts spontaneously, or too rapidly, or too violently, it is inferior combustion, and makes a pinging or rattling noise from the engine, usually when accelerating. Severe pinging can quickly destroy an engine. Chronic mild pinging can eventually result in serious damage to an engine. A sturdy engine can withstand occasional light pinging, though maybe with slightly accelerated wear on certain parts. When any pinging occurs, efficiency and power are reduced, and fuel consumption is increased. Put simply, pinging is not good."
On newer cars the knock sensors will catch the detonation early and send the message to the ECU to slash down the timing, but it's still not exactly healthy for the engine.