As such, there isn't any certain way in which you can prevent panic attacks as there is no known methodoly that predicts whethet a person is likely to suffer panic attacks or not.
Having said this, however, once these attacks occur, getting immediate help can prevent them from becoming sever and chronic and also stop them from becoming a regular occurence in your life.
The key is to start on a proven panic attack remedy and then to stick to it. All the proven remedies that you can do yourself have been enumerated and reviewed in detail on this site (seemenu).
In addition, watching out for precipitating factors, such as stress, and performing mental and emotional relaxation techniques come in good stead.