“Panic attack” is a term that has come to be used very loosely for an anxious reaction. “You hear a lot of people say things like, ‘When I’m around dogs I have a panic attack,’” says Dr. Jerry Bubrick. “Most likely what they mean is they get panicky, but they’re not having a real panic attack.”

A real panic attack is when you experience sudden, intense physical symptoms — racing heart, sweating, shaking, dizziness, shortness of breath, nausea — and you interpret them to mean something is terribly wrong. People often believe they’re dying. Or “going crazy.”

“All of a sudden, you have this explosion of physical symptoms that are really uncomfortable,” explains Dr. Bubrick, the director of the Anxiety Disorders Center at the Child Mind Institute. “A lot of times, people think that they’re having a heart attack and they go to the emergency room.”

Andrea Petersen describes having a panic attack at 20, on an “ordinary morning” when she was a sophomore in college registering for classes. “All of a sudden my heart rate kicked up, I was short of breath, and the words I was reading started to morph, to dip and buckle,” she recalls. “I was gripped with this overwhelming terror. I felt like I was going to die. Something in my body or brain had gone horribly wrong.”

Ambushed by panic

What you’re experiencing in a panic attack is your body’s alarm system — which is wired to prepare you physically to handle an emergency — going off without a real threat. Panic attacks usually peak at 10 minutes and abate by about a half hour. But some people report ongoing symptoms.

Petersen, whose memoir On Edge: A Journey Through Anxiety, chronicles her experience, as well as the latest research on anxiety, spent a month on her parents’ couch, immobilized by intense physical sensations as well as overwhelming terror and dread. “I think of it as a month-long panic attack,” she says. “Yes there were peaks and valleys. But it was a full-body and consuming experience, and incredibly disabling. And, it turns out, not actually that unusual.”

Often, as with Petersen’s experience, a panic attack happens out of the blue, and you have no clue what triggered it. Clinicians call those unexpected panic attacks.

But people who’ve had panic attacks often associate them with places or situations where they’ve occurred, and anticipate with mounting anxiety having another attack in that situation. That makes them prone to what clinicians call expected panic attacks.

Panic disorder

A panic attack develops into something called panic disorder when a person worries so much about having another attack that she begins to avoid places or situations that she associates with them.

Not everyone who has a single panic attack goes on to develop a full-blown disorder. Some have the experience but dismiss it as an uncomfortable aberration that they hope won’t happen again. But in someone who is predisposed to anxiety disorders, Dr. Bubrick notes, the pathway in the brain that assesses for threats may be hyperactive. Avoiding another attack becomes an overriding priority.

For Petersen, whose panic disorder wasn’t diagnosed for a year, “My world just got smaller and smaller. If I was in the line at the coffee shop, and I felt panicky, I wouldn’t go to the coffee shop again. I stopped going to movies. I stopped going to parties. I stopped doing pretty much anything besides going to the couple of classes I was able to take  — I had to drop half my courses — and my room in the sorority house.”

Related: What Is Social Anxiety?

Panic plus agoraphobia

Because part of the experience of a panic attack is an intense need to flee, people who’ve had them often avoid situations where it would be difficult to get away if an attack occurred, such as cars, trains, planes, crowds. This avoidance of places deemed difficult to escape is agoraphobia.

“Agoraphobia just means the fear of not being able to escape a situation in case you have a panic attack,” says Dr. Bubrick. That often includes enclosed spaces. “People will say, ‘You know what, it’s fine. I just won’t cross a bridge, ever. I won’t go on a plane. I don’t need to fly anywhere,’” he adds. But it could also be at a baseball game with friends who wouldn’t take kindly to having to leave in the fifth inning. Or at the theater, or a movie.

Petersen, a Wall Street Journal contributing writer who is an ambitious traveler despite her anxiety, notes that even now she doesn’t drive on the highway, after a “terrible” panic attack driving between San Diego and Los Angeles.

Avoidance widens

People with panic disorder also can develop intense fear of the physical sensations associated with panic — like an elevated heart rate, sweating, shortness of breath — even when they’re not in the context of a panic attack. That might lead them to avoid exercise because they interpret those physical sensations as dangerous, even though they’re actually signs of a healthy, strenuous workout.

“You can imagine a lot of people then don’t go to the gym,” Dr. Bubrick notes. “People don’t want to be in situations where it’s hot, because that might trigger them, or in situations where they think they’re going to have that physical distress like on a rollercoaster or an airplane. “

While young children can have fearful or panicy episodes, true panic disorder doesn’t appear until the teen years. Panic attacks can also develop as a feature of another kind of anxiety, like social anxiety with panic attacks, or specific phobia with panic attacks.

Related: How to Talk to Your Parents About Getting Help

Treatment for panic disorder

Research shows that the most successful treatment for panic disorder is a combination of antidepressant medication and cognitive behavioral therapy (CBT). Many clinicians recommend CBT as the first-line treatment, with medication added if necessary to make the patient comfortable enough to participate in CBT.

In treating someone who has panic disorder with CBT, the clinician starts by working with the patient to think more flexibly about his anxiety. Rather than viewing the physical symptoms as dangerous, he practices tolerating them, knowing that they aren’t harmful.

To help the person disconnect the negative feelings associated with attacks, the therapist induces those physical sensations — the patient does jumping jacks or stair climbing to get the heart racing, spinning to get dizzy, breathing through a coffee straw to get shortness of breath. “We’re exposing you to the actual, physical feelings of a panic attack, one symptom at a time,” Dr. Bubrick explains.

Then, instead of simply tolerating the anxiety and waiting for it to subside, the person is taught how to do deep breathing techniques, to calm the physical symptoms down. Some clinicians don’t do the deep breathing, on the grounds that the symptoms will pass on their own. But Dr. Bubrick likes to give kids tools to give them a sense of empowerment, “to have them feel that they can control the symptoms.”

As the fear of attacks diminishes, attacks themselves grow less severe and less frequent. The person is also ready to start venturing into real-world situations associated with his panic attacks. “Now we can go onto buses or subways or movie theaters, wherever it is they were avoiding, knowing that if they have a panic attack they have a way of dealing with it.”

Patients who’ve been treated with CBT sometimes return for “maintenance sessions,” to refresh their skills. “When I start to feel anxiety kick in, and I feel a relapse is possible,” Petersen says, “I go for CBT again.”

 Medication treatment

If you think of panic attacks as a malfunctioning alarm system, antidepressants called selective serotonin reuptake inhibitors (SSRIs) make the system less reactive.

Petersen describes the effect of SSRIs as reducing the intensity of worry. “Over several weeks I notice that if worry was taking up 70 percent of my brain before, space is opening up, and worry is taking only 40 percent,” she says. “I find myself more present in the moment, able to have conversations, actually hearing what the other person is saying. The worry monologue can be so loud and so distracting.” And she says, over time there are fewer panic attacks.

It’s not uncommon for people who experience panic attacks to be prescribed a sedative such as Klonapin, Xanax or Ativan to be taken if they have an attack. But since panic attacks are short-lived, clinicians note that it’s easy to misinterpret the diminishing symptoms as the effect of the medication, and develop a psychological dependency. And these medications, called benzodiazepines, have to be taken very carefully, as they can become addictive, and have dangerous interactions with other medications.

Being open about panic attacks

While panic attacks are much more widely understood than they were when Petersen was first experiencing them, she notes that research shows that people who have panic disorder often wait years before they discuss symptoms with a medical professional — or even other people. It’s easy to feel ashamed by the symptoms — if you’re not dying, does that mean there’s something terribly wrong with your brain?

When she was struggling in college and didn’t know what was wrong with her, she notes, “I told friends that I had mono.”

But later, after some bad experiences with romantic partners who weren’t supportive, she says, “I made a vow to tell every person I dated about my anxiety up front, as if it was a communicable disease. Being around people who can accept that part of you and support you is super important.”