Involuntary activities are controlled by the autonomous nervous system, whose main component is a part of the brain stem called the medulla oblongata. This system, as a subset of the peripheral nervous system, functions outside the brain and spinal cord and is composed of the sympathetic and parasympathetic nervous systems.
The medulla oblongata directly controls heartbeat, blood pressure, breathing and digestion. The sympathetic nervous system controls the body's "fight-or-flight" response, which quickly increases blood flow and breathing rate in response to danger or excitement. The parasympathetic nervous system does the opposite; it reverses the changes done by the sympathetic nervous system in order to calm the body, although its response is slower and occurs over the course of a few minutes.