If you can, let your teachers or parents know. Do you have any specific things that trigger these attacks? Like fear of being called on? Tell your teacher, since anxiety attacks are very serious! Try to establish a signal between you and your teacher so you can leave for a bit to feel better, or talk to a councilor: let people know so they can help these attacks stop. Focusing on your breathing, like counting and breathing slowly and controlled. Relax yourself, notice if your shoulders are tensed or your fists are balled and loosen them.
If these attacks are related to public speaking or being called on, there are workshops and classes to help you get used to these situations. Often, held at a town center or library, they can be cheap or free and the people teaching are often very experienced. Exercising, even less active moves, can help reduce anxiety, as well as making your diet healthier. Breathing exercises work well, also meditation. Definitely tell people though so they can understand and help you, close friends and parents. Not everyone will get it, and that can be immensely frustrating. It’s okay though, there will be other people who are going through the same thing or know someone who has and can and will help you! Good luck!