The ANS is a mostly involuntary system. It is part of the peripheral nervous system and controls heart rate, digestion and release of urine and sexual arousal (organ function and homeostasis). The three parts of the ANS are the enteric nervous system (nerve fibers of the viscera), the parasympathetic nervous system (fight or flight), and the sympathetic nervous system (rest and digest).
There are two subsystems of nerves, ones leading away from the CNS cortex (motor efferent) and ones leading towards the CNS cortex (sensory afferent). Afferent sensory neurons carry impulses away from organs. The efferent neurons bring the impulses to the muscles (resulting in movement) and glands.