If a non-Jew worships mountains and hills, these mountains and hills remain permitted for benefit. The same is true when a Jew worships them, but the ruling follows the language of the Torah describing idol worship. However, the adornments of silver and gold on them become prohibited.
Rabbi Yose HaGlili explains that when the Torah says, “Their gods on the mountains,” it also teaches that the mountain themselves are not gods. If so, continues Rabbi Yose, why do we find that a tree that was worshipped is prohibited? - Because man's hands are involved in its growth.
Rabbi Yose seems to agree with the first teacher, and if so, why did he speak up? Usually people only voice disagreements! - There is a disagreement here too: if the tree was first planted and afterwards worshipped, and not planted for worship from the start, then Rabbi Yose prohibits what grows on it after worship, but the first Sage allows this after-growth.
Rabbi Akiva says that by enumerating mountains, hills, and trees, the Torah is also telling to search for an idol at each such place. When one uproots an idol, he has to plow the place.
Art: Caspar David Friedrich - The Wanderer