As hinted previously, some functions are voluntary and some are autonomic. This is because the PNS (peripheral nervous system) is split into voluntary and autonomous systems.
Furthermore, the autonomous system is split into sympathetic and parasympathetic, the two acting antagonistically depending on the situation. They act on all body systems to spark alertness (fight or flight response) in the case of the sympathetic system, or the opposite (rest and digest) by the parasympathetic system. This acts on the pupils (dilation), the respiratory system, circulation, digestion, blood glucose, stress, excretion, etc.
The sympathetic system relies on the secretion of noradrenaline in response to stress, which binds adrenergic receptors to elicit response from the aforementioned systems. Pupils dilate, respiratory rate and heart rate increase, blood pressure increases, digestion is inhibited, etc.
Conversely, the parasympathetic system relies on the neurotransmitter acetylcholine and results in increased digestion, lowered heart rate and blood pressure, glucose storage as glycogen, sexual arousal, excretion, etc.