There are 2 types of knock and both are totally unrelated.I am not sure which one you mean so I will cover both.
1.Rod Knock-piston rods bearings have excessive clearance and therefore make loud horrible sounds referred to as "knocking".Solution:Rebuild the engine
2.Detonation,pre-ignition,spark knock-(all the same thing)In the case of our cars is a result of not enough fuel or octane or too much boost or even too much timing.Solution:Race gas,lower boost,fuel system uprades,alchy,new chip suited to combo and others are all effective methods.