I suffered from crippling panic attacks for a while. When I feel one coming on I take something. They are a physical manifestation of the stress I was under. It is that fight or flight response, natures way of telling us there is danger ahead (like a sabertooth tiger headed towards us). The primitive part of your brain which reacts to stressors sees stress as stress, can't tell if it is a bear attack or something emotional. All it picks up is 'stresss! better kick up the heart rate and breathing so that I can escape this dangerous situation'. Now we not longer react to wild animal attacks (I hope) but other types of stress which trigger that same part of the brain.
Controlling your breathing (taking deeeeep breaths) really helps lessen the symptoms. But yes, they feel awful.