Listen for the location of the noise with the engine running and the hood open. You may need someone to help if it needs to be in gear to hear the knocking.
You could have bad gas or need a higher octane or have an engine knock from the top end or bottom end.