The automous nervous system (within the peripheral nervous system) controls glands and vital muscles eg heart.
The autonomic is involuntary and made up of the sympathetic nervous system and the parasympathetic nervous system.
The sympathetic nervous system prepares the body for fight or flight: dilates pupils, inhibits saliva production, increases breating, increases heart rate, stimulates glucose production, inhibits digestion and releases bladder.
The parasympathetic nervous system maintains and conserves energy: contracts pupils, stimulates saliva production, decreases breathing, decreases heart rate, stimulates bile production, stimulates difestion, contracts bladder.
The fight or flight response is assisted by the endocrine system which releases hormones into the system.
The pituitary gland releases ACTH which stimulates the adrenal glands to release adrenalin ino the bloodstream. This constricts blood vessels in the stomach to inhibit digestion and increases the heart rate - thus aiding the sympathetic nervous system with fight or flight.