One of the best definition of Idolatry:
What does it mean to have a god? or, what is God? Answer: A god means that from which we are to expect all good and to which we are to take refuge in all distress, so that to have a God is nothing else than to trust and believe Him from the [whole] heart; as I have often said that the confidence and faith of the heart alone make both God and an idol. If your faith and trust be right, then is your god also true; and, on the other hand, if your trust be false and wrong, then you have not the true God; for these two belong together, faith and God. That now, I say, upon which you set your heart and put your trust is properly your god.
Martin Luther Larger Catechism.