Knocking water pipes seem to be a mystery to many homeowners. Although there is nothing seriously wrong with your pipes, the knocking sound is an unnecessary irritant. There are several things that could cause the noise, like loose pipes rattling against the wall, too high water pressure, too hot of water, and the most commone is water hammer. The fix for water hammer is relative easy and you should be able to fix it in less than 20 minutes.
Try this method before calling a plumber.
To eliminate the sound, start by turning off all the faucets in the house and then turn off the main water valve in your house.
Next, turn on all of the faucets and flush every toilet in your home to drain the water. Do this for as long as it takes to stop any water from coming out. When you are certain everything has been drained as dry as possible, shut off all of the faucets.
Then go back to your main valve and very slowly turn it back on. The knocking sound should be eliminated.
Let me know if this works. If not I can explain other fixes.