I assume you are referring to the noise made by an engine in good working order? i.e. not a worn big end or whatever?
Engine 'pinking' or knocking is caused by the petrol - air mixture exploding instead of burning at the correct rate...
When a petrol engine compresses the petrol - air mixture in the combustion chamber the ignition by the spark plug should normally cause a burn of the mixture, the ignition is usually a few degrees before top dead centre of the piston stroke to allow the mixture to reach maximum force to occur on the downward stroke of the piston. If the petrol is too high an octane rating or the ignition has been set to occur to early before top dead centre the mixture may well burn too fast or too early resulting in the maximum force being generated before or at top dead centre of the piston's stroke therefore causing the maximum force to be applied before the piston can move on its downward stroke. This causes the sound of a 'knock' as the fuel air mixture is impacting on the piston and the con rod when they are not able to use the force produced.
The end result is excessive wear on the bearings of the piston, conrod and crankshaft...
John.
__________________
A little knowledge is a dangerous thing - Googling is far worse!