Knocking or pinging is a sound that an engine makes when the air-fuel mixture in the combustion chambers ignites too early. (Also known as pre-detination). Although slight knocking or pinging won’t damage your engine, loud knocking can cause damage and should not be allowed to continue. It can actually burn a hole right through the piston over time. The solution is to use a high octane fuel, which is actually more difficult to ignite, despite the misconception that high octane fuel is more powerful. When the fuel is more difficult to burn, early ignition is eliminated, and with it the knocking or pinging.
The octane level required by an engine is determined by its compression ratio: higher-compression engines require higher-octane fuel. For example, a basic sedan generally only requires the standard octane fuel offered at gas stations, while a high-performance sports car or race car may require a high octane fuel. The owner’s manual lists information on the type of fuel you should use in your car. The reason behind this, the more advanced the engine timing can be, the more power the engine can produce. In most engines today the timing is controlled by the computer that receives a signal from a knock sensor. The engine will only advance the engine timing up to the point of knocking. So if you raise this point with higher octane, then the computer will allow the engine timing to advance further than using lower octane thus delivering more power.
Gas stations typically offer three different octane levels of fuel: regular, mid-grade, and premium. The regular grade generally has the octane level required by most cars, and mid-grade and premium are each a step up. Then, of course, there is the super high octane fuel available at race tracks, which is designed for the extremely high compression ratios that race car engines have. Pretty much all of the fuel grades commercially available have cleaning additives in them, so you need not choose a high octane fuel with the idea that it will clean your engine better.