From article: Causes of Panic Attacks, by Joe Barry McDonagh.
Anxiety is a response to a danger or threat. All of its effects are aimed toward either fighting or fleeing from the danger. Thus, the sole purpose of anxiety is to protect the individual from harm.
When confronted with danger, the brain sends signals to a section of the nervous system responsible for gearing the body up for action and also calms the body down and restores equilibrium.
To carry out these two vital functions, the autonomic nervous system has two subsections, the sympathetic nervous system and the parasympathetic nervous system.