I have a slight knock when the car is in the idle position but once you give it gas it goes away what is the problem!
The first concern is your oil system. Do you have full and clean oil in the vehicle? If the fluid is low, or there is an oil leak, the vehicle will have low oil pressure at idle. When the engine is running at a faster RPM, the oil pump is working harder and supplying a greater flow of oil to the engine. This may be one reason you are hearing a knock.
You may also be hearing different types of combustion going on in the cylinders. If the engine is not running at its prime, during idle the combustion cycles can become unstable. This may sound like a "knock" under some conditions. A tune up is one of the best ways to access a situation like that.
I recommend having a certified mechanic, such as one from YourMechanic, come to your location to determine why the engine is knocking and suggest any necessary repairs.