Idol worshippers would sometimes worship different components of planet Earth, maybe a mountain or hills—items that are connected to the ground. The Mishnah here is going to say that items connected to the ground cannot become prohibited to benefit from, but anything else associated with Avodah Zarah (idol worship) can become prohibited to benefit from. The Mishnah says that if non-Jews worship mountains or hills, those mountains or hills are permitted to benefit from. If a person wants to plant on a mountain or take something from it, that is permissible. But whatever is on them—for example, gold or silver spread out on the mountain—would become problematic. You cannot benefit from. The Pasuk (verse) tells us, “You shouldn’t desire the gold and silver, the silver and gold that is on them. You’re not allowed to take them,” which tells us that you’re not allowed to benefit from any ornament connected to an Avodah Zarah.
The Pasuk says, “You should destroy all the places where the nations that you’re about to dispossess worship their gods, on the high mountains and on the hills and under every leafy tree.” That Pasuk could be understood as follows: it refers to the gods on top of the mountains, but not to the mountains themselves being worshipped. Those mountains themselves cannot become gods through the worship of Avodah Zarah. The gods on the mountains are what you’re not allowed to benefit from. The same applies to the hills: the gods are on the hills, but the hills themselves are not gods that you’re forbidden to benefit from. So we learn from here that mountains, hills, and all types of similar objects attached to the ground would not become prohibited as idols if they were worshipped by Avodah Zarah. They would not become prohibited as idols.
We might think that the final words, “under every leafy tree,” should be understood in the same way: the trees themselves, which are attached to the ground, do not become prohibited to benefit from. But the problem is that we learn elsewhere that you’re supposed to destroy an Asherah tree, a tree of idol worship, and that it should be cut down. So how do we deal with that? Why don’t we understand the Pasuk here as teaching us that you’re allowed to continue benefiting from the trees? We may ask: Why is an Asherah tree, a tree of idol worship, forbidden, as the Pasuk tells us? Why don’t we just stay with this Pasuk and say it’s not forbidden? Because a tree only comes into existence through a person’s effort, through a person’s involvement. A person plants it and tends to it. Whatever comes about through a person’s involvement is forbidden if it is worshipped. The mountains and hills come only from Hashem. A person is not involved in creating them. Therefore, if they are worshipped, it is permitted to benefit from them. But a tree, which a person is involved in bringing to fruition, does become prohibited.
Rabbi Yosef told us why a mountain or a hill is different from a tree. But he didn’t tell us what the words of the Pasuk are actually telling us. What are we learning from those words of the Pasuk? So Rabbi Akiva says, “I’m going to explain and argue the logic of this Pasuk before you. Every place where you find a high mountain, an elevated hill, and a leafy tree, know that there is Avodah Zarah there.” Says Rabbi Akiva, the Pasuk is commanding the Jewish people that wherever they find a tall mountain, and there's an elevated hill, or a leafy tree, one of these three, you have to find a tall mountain. You have to know there's an idol there. So go to that spot, seek out the idol, and destroy it. The Jewish people were commanded to get rid of all the Avodah Zarah. So here it is not telling us a specific law; it is giving guidance to the Jewish people about where to find the Avodah Zarah that they have to root out, that they have to destroy.

