Yes, you can develop a fear of heights through classical conditioning. So the basic idea for classical conditioning is this: an unconditioned stimulus (US) naturally produces an unconditioned response (UR). But when you pair a US with a conditioned stimulus (CS), then this continues to produce the UR. After multiple pairings, the CS can be presented alone to produce the conditioned response (CR).
To break it down even further, classical conditioning is:
US –> UR
CS + US –> UR
After repeated pairings:
UR = CR
CS –> CR
So let’s go through how classical conditioning causes a fear of heights (acrophobia). So let’s say when you are in danger or hurt (US), then your fight or flight response is activated (UR). So let’s further imagine that you hurt yourself by falling whenever you are on top of a tall building (CS). When you pair being on top of a tall building (CS) and hurting yourself by falling (US), then this leads to the point where you have the fight or flight response activated. After multiple pairings of of the CS and US, then it comes to the point where just being on top of a tall building (CS) with no US leads to the conditioned response (CR) where the fight or flight response is activated.
This is an example of how a fear of heights develops through classical conditioning.