When we are confronted with a clear, real and immediate threat to our safety, the adaptive responses we have at our disposal are fight or flight (and sometimes freeze). These are the end result of the activation of the sympathetic nervous system (SNS), which is basically our internal alarm system that switches on to help us to get out of danger and keep us alive. Phobias occur when the brain's warning system forms an inappropriate connection with what is objectively considered to be a low-threat object (i.e., spiders, dogs, needles) or a low-probability-of-harm situation (i.e., walking outside, using transportation, social interactions, being in an elevator, going to the dentist). An excessive fear of illness can also provoke the SNS; in this case, the trigger for the fear is within, and not so easy to avoid as external objects or situations. Panic attacks typically occur when the feared object/situation triggers or sets off the SNS, causing in effect a false alarm.
Typically, with a phobia or fear, the probability of actual physical or psychological harm is extremely low. Therefore, it is not adaptive to have the rush of adrenaline and feelings of anxiety, which would be useful to enhance survival in an actual emergency. Under the false alarm scenario, these reactions become maladaptive, or harmful, taking a physical and emotional toll on the person, for no good purpose. In reality, chances are almost 100% that no harm will occur, but for the person that has the phobia, it seems as though the threat is present right now. This connection between the feared object/situation and the SNS is learned, and the association can be unlearned (extinguished), or at the least, managed successfully. .