You develop a fear of heights from how you think and what you do. It is not the heights itself that is anxiety-provoking...what is anxiety-provoking are your thoughts about the situation. So let's say you are on top of a tall building. Then you may start to have irrational thoughts such as: "I might fall;" or "The building may collapse;" or "I'm going to die from the fall." These irrational thoughts then induce anxiety, fear, and the physical effects of anxiety, which include racing heartbeat, fast breathing, sweating, trembling, and lump in the throat, just to name a few.
So these anxiety symptoms can be quite distressing, so you avoid going to anything that is tall and very high up. So when you avoid going to the top of the tall building, you never get to find out that the anxiety will just go away naturally on its own, if you just stay on top of the building.
So the avoidance maintains the belief in the danger and urgency of events. This then continues the negative, vicious cycle of the fear of heights. So the fear of heights is triggered by being in tall buildings or high structures. This in in turn triggers irrational thinking, which induces anxiety. The anxiety then forces you to avoid, but this maintains the negative, vicious cycle of a fear of heights.