Engine-knocking sound when in idle!

As i pulled up on my drive after my usual journey home from work i turned my radio off and immediately noticed an unusual sound from the engine. I opened the bonnet and thought it might be the cam belt, the engine seemed to be revving on its own to around 1100 rmp then back down to its normal 700 ish. Doesn't sound great at all and i wondered if anyone had experienced similar noises and could help, thanks.