Abarim Publications' online Biblical Hebrew Dictionary
במה
The feminine noun במה (bama) has no clear etymology. Form-wise it could be expected to come from בום (bwm) or במם (bmm), but those words don't occur in the Bible or anywhere else. The noun itself also appears in Assyrian.
The noun במה (bama) primarily denotes high places, such as mountains tops or ridges (Micah 3:12, Ezekiel 36:2). Since military control over these high places is strategically advantageous, the Biblical expression "riding/ treading the high places" is synonymous to controlling the land (Deuteronomy 32:13, Amos 4:13, Isaiah 58:14).
But most often our noun is used for the high places of cultic worship. Initially these were literally high places, such as mountain tops (Numbers 22:41, 1 Samuel 9:12) but eventually במה (bama) came to be applied to any local shrine or holy structure (2 Kings 17:9, Ezekiel 16:16).