Imagine breaking out in a sweat, feeling your heart racing out of control and wondering if you’re about to pass out, all while driving along an interstate. This is just a glimpse of what some people experience when they have a panic attack.

A panic attack is a recurring feeling of intense fear. It lasts for several minutes and triggers physical reactions in your body. “They are fairly common, and can even happen in your sleep,” says Michelle Riba, MD, professor of psychiatry at the University of Michigan and past president of the American Psychiatric Association . “Sometimes it’s related to something, such as going over a bridge or going to a funeral, but often they happen for no apparent reason,” she says.

Related: 9 (Almost) Instant Stress-Busting Strategies

How to cope when an attack hits

There are a number of ways to manage a panic attack and regain a sense of calm.

Distract yourself. If you’re in the car when a panic attack occurs, open your window and turn on the radio. Or listen to a podcast or audio book. Pop a mint in your mouth. If you can, says Riba, pull off the road until it passes.

Focus on something that’s pleasing. Take in the trees or sky. If you’re indoors, visualize a favorite vacation spot. At the mall? It may sound trivial but head to the sale rack or sample some perfume or cologne. Anything to switch gears in your brain can help, Riba says.

Take deep breaths. Inhale and exhale slowly. Count to 10 or even 20 while you do it, the Anxiety and Depression Association of America (ADAA) suggests.

Focus on a friendly face. This can help if you’re at work and need to get through a presentation or meeting.

Take a long drink of water, Riba suggests. It can buy you some time if you’re in a business situation.

Reassure yourself. The average attack lasts just minutes, Riba says. Remind yourself that relief is mere moments away.

Acknowledge it. The United Kingdom’s National Health Service (NHS) says you shouldn’t try to deny or resist a panic attack because it will make it worse. Acknowledge what’s happening and pull out your arsenal of coping strategies.

Try to stay positive. The NHS recommends replacing negative thoughts with positives ones. If you’re feeling the attack will end disastrously, for example, think instead about how good you’re going to feel in a few minutes when it passes.

Related: Ease Your Anesthesia Anxiety

How to head them off

Get some therapy. “In some forms of psychotherapy people can be taught what to do in the moment to calm themselves down,” says Riba. Understanding that it's panic attacks they're experiencing and what panic attacks are also helps a lot of people, she says.

Limit alcohol and caffeine. These can aggravate anxiety and trigger panic attacks, the ADAA says.

Go to sleep. Getting enough sleep reduces stress and can prevent a future panic attack. If you travel, try to avoid overnight flights, and schedule time to get enough rest when crossing time zones, recommends Riba.

Meditate or do yoga. These and other relaxation techniques can help clear your head. Getting regular exercise also helps, according to the ADAA.

Consider taking antianxiety medication. The American Psychological Association (APA) says medication may be appropriate in some cases. Talk with your doctor.

Related: College Students: How to Conquer Exam Anxiety and Avoid a Nervous Breakdown

How do you know if you’re having one?

According to the APA, common symptoms of a panic attack include:

  • A racing heart
  • Difficulty breathing
  • Feeling out of control or that you’re losing your mind
  • Dizziness or lightheadedness
  • Nausea
  • Shaking or trembling
  • Hot flashes or chills
  • Fear that you may die

Some people also describe having an out of body experience.

Since panic attack symptoms may feel like symptoms of a heart attack, the Women’s Heart Foundation says, err on the side of caution, particularly if you have heart disease, and call 911.

Causes and triggers

In some cases, panic disorder may be genetic. Studies with twins have suggested anxiety disorders may run in families. Stressful or traumatic events also may be to blame, says the National Alliance on Mental Illness. Riba adds that hyperthyroidism and steroid use can contribute to panic attacks, as can an imbalance of certain chemicals that occur naturally in the brain.

“Some don’t know what it is and don’t talk about it,” says Riba. This is unfortunate because treatment is usually very successful, she adds.

Related: Can Meditation Calm Your Anxious Child?

Kathleen Heins is a Greenville, S.C.-based writer specializing in health, well-being and organizing whose work has appeared in Better Homes and Gardens, Ladies’ Home Journal, Woman’s Day, USA Weekend and Reader’s Digest, among other publications.