The slow breathing......which has already been described will help.
The paper bag thing went out of favour for ages, however it is back again because the physiology works. When you hyperventilate you actually end up with too much oxygen in your blood....the transfer of oxygen to cells requires a certain level of carbon dioxide in order to happen. The weird feelings you get when you have too much oxygen....eg feeling breathless, trigger you to feel more anxious. As do the weird feelings from adrenaline etc that is not expended in intense physical activity. We naturally over breathe when we feel anxious because we evolved the anxiety response in order to meet real physical danger.
When we have a panic attack we get into a cycle of responding to the symptoms as though they are dangers...vicious cycle.
Breathing into and out of a paper bag will naturally increase your carbon dioxide levels and you start to feel physically more normal..
The key is the cognitive part, though....to be aware that your body is reacting too hard to some sort of anxiety......often such attacks occur separate from the triggers, which can be confusing...like when we are relaxing!
Your mind interprets the physical symptom as a threat.....usually that we are dying, or nuts, or that something awful is about to happen. You need to ride the thing like a wave...maintaining awareness that, like a wave in the ocean, if you remain aware of what is happening, you won't be adding to the symptoms and it will pass.
If they become a problem, they're usually easy to treat...lots of people are helped just by reading about them in a good self help book so they really understand what is happening.