An engine knocking sound is frequently described as a metallic pinging noise that resembles the noise made by metal balls being shaken in a tin can. During light acceleration, or when going up hill, it is normal for some engines to exhibit a slight engine knock noise. This noise can be described as a metallic tapping noise that comes from the engine compartment, which changes with engine speed. Some cars will also produce a metallic ticking noise immediately after start up caused by the pistons. Using fuel with too low of an octane, carbon build up in the engine, or a poorly tuned engine can cause an engine knocking sound.
For more info, see What Causes Engine Knocking