I've had them all my life, that I can remember. Some of it's organic, some people are more susceptible to them by genetic neurochemical wiring, or so I'm told. Hormones also have an effect on them for women. Both my parents have panic attacks, so I'm apparently prone to it genetically. Or they installed all my buttons or both, I'm sure.
Some medical conditions like asthma or allergies can also affect the propensity, and we're smack in the middle of allergy season. (I'm also an asthmatic, I have the perfect medical profile to be prone to panic attacks.)
The best thing you can do is to calmly talk to someone having an attack. They probably won't be able to talk, as you hyperventilate when you panic, so not enough air for that. Some people like to be touched or hugged comfortingly during an attack, some find it induces more panic to be touched, you'll have to find out how she reacts to that.
Don't take it personally if being touched or very physically close during an attack makes her even more panicky, it can make some people feel claustrophobic and so they need space.
Be soothing in voice and manner(my husband had this bright idea he could snap me out of it by yelling at me at first, which only made it worse...he's not always a genius. LOL), remind them to breathe and try to get them to do two things, which are the only part of a panic attack you can control physically. Get them to sit or recline immediately(in case they faint, it can happen), and try their best to take deep, regular breaths. A paper bag helps a lot, have them breathe into one if they have one, or even place thier cupped hands over their mouth and nose. That gives you more carbon dioxide, which eventually triggers slower breathing.
Remind them that they're safe, that you're there, and even if they feel faint or nauseous, it's all right, the worse that can happen is that they pass out on a soft chair or bed briefly...when you faint, it relaxes you and you automatically breath more normally, so even that's fine, it won't HURT you as long as you don't fall.
Throwing up won't hurt you either, it's just embarrassing.
When they calm down, try to see if you can figure out what triggered the attack, most people have some triggers that set it off, sometimes because of a bad memory or experience where they felt helpless or afraid and something similar has been experienced, even a smell or a word might do it.
For a while, my trigger was the word "money" because we'd gone through a bankruptcy and foreclosure, which is a very anxiety provoking thing, of course. Just saying the word "money" would make me feel faint, hands and feet start to tingle and I'd hyperventilate and feel like I was having a heart attack, as chest tightness, called "somatic reaction" is part of panic attacks too. I worked on desensitizing myself to that, because it's a pretty common word people use. Can hardly get through the day without hearing it.
It has helped, but sometimes, still, it can make me start to have butterflies in my stomach to hear or read the word. Gee, I just typed "money" now and it didn't cause anything but a tiny lurch...must be getting better.