Idolatry has its root in the heart and mind in two senses.
Rom. 1:21 Because that, when they knew God, they glorified him not as God, neither were thankful; but became vain in their imaginations, and their foolish heart was darkened.
1 Cor. 10:31 Whether therefore ye eat, or drink, or whatsoever ye do, do all to the glory of God.
First, idolatry is the mental usurpation of God by denying Him proper recognition (preeminence) in any aspect of your heart and then by consequence in your life (Rom. 1:21). Whatever replaces God as preeminent in your heart and life becomes your god and therefore idolatry is revealed by the motive behind everything you do because if everthing you do is not for the glory of God it is glorifying another god which is anything that replaces God as the object of your service.
Rom. 1:22 Professing themselves to be wise, they became fools,
23 And changed the glory of the uncorruptible God into an image made like to corruptible man, and to birds, and fourfooted beasts, and creeping things.....
25 Who changed the truth of God into a lie, and worshipped and served the creature more than the Creator, who is blessed for ever. Amen.
Secondly, idoltry involves a wrong mental concept of God. The reason people make images and bow down to them is because their mental concept of God permits them to give that kind of visible expression to God. Hence, idolatry begins in the mind with a wrong concept of God which in turn gives visble expression that represents their mental concept of God. Hence, those who deny the Biblical revelation of the true God are idolaters.