Starting from the beginning of Ezek. 16, verses 1 & 2 show that the prophet was told to speak to the people of Jerusalem, the main or capital city of Judah, and inform her of her "abominations".
Ezek. 16:3-14 rehearses how God rescued them, clothed them, loved them, entered into a covenant with them, and made them His.
Then, in vs. 15 we are told:
" But thou didst trust in thine own beauty, and playedst the harlot because of thy renown, and pouredst out thy fornications on every one that passed by; his it was." (KJV)
Playing the harlot meant that they had turned from God to worship idols; they had committed adultery against His covenant, His husbandry of them. The following verses told how they took the beautiful adornments He had bestowed upon them and gave them to their man-made idols which they set up in their "high places"... hills and mountain tops. (High places is used for their places of their pagan temples.)
Vs. 20-21 then tell how the Hebrews even sacrificed their own children upon the burning arms of their idol.
And, in vs. 25 then the expression "hast opened thy feet" is the same as if we say today "spreading their legs". God was telling them they had become harlots and committed adultery with their idols and with other nations.
" But as a wife that committeth adultery, which taketh strangers instead of her husband!" (KJV)
Ezekiel continues on through the rest of the chapter to compare Jerusalem to her sister Samaria (vs. 46) which was the main or capital city of the northern 10 tribes of Israel. He tells them that the Lord was going to raise up all of her lovers to come against her and destroy her (vs. 37-42).
The entire chapter lays out the prophesy of the destruction of Jerusalem and the reasons for it. The immediate sense was the destruction at the hands of the Chaldeans (Babylon) that happened about 606-586 BC, and the ultimate fulfillment was their final destruction in A.D. 70.