Anxiety attacks are triggered, while panic attacks occur randomly and spontaneously. Anxiety attacks are treated by addressing the type of anxiety disorder that it is associated with. The following anxiety disorders are associated with anxiety attacks when confronted with the feared stimuli: specific phobia, social phobia, post traumatic stress disorder (PTSD), and obsessive compulsive disorder (OCD). So treating the underlying anxiety disorder associated with the anxiety attacks is the way to eradicate the anxiety attacks.
Anxiety attacks can also occur when you are exposed to extreme stress, such as losing a loved one, losing your job, relationship breakups, and work stress, just to name a few. So stress-induced anxiety attacks need to be addressed by reducing the stressors, building coping skills, and instilling relaxation strategies.
Panic attacks come out of the blue, with no apparent triggers. Panic attacks can wake you from sleep, occur while you are sitting watching TV, or occur while you are out for a stroll in the park. Panic attacks occur with panic disorder. So if you treat the panic disorder, then you eradicate the panic attacks.