The Brain Stem
The brain stem connects the cerebrum with the spinal cord. It is the most primitive part of the brain and is involved mainly in regulating vital processes. At the bottom of the brainstem is the medulla oblongata, which has nerve sensors that control many vital processes such as breathing and heartbeat.

Right above the medulla oblongata is the pons, which connects the hemispheres of the cerebellum. Above the pons is the midbrain, which controls eye movement and the size of the pupils. At the top of the brain stem is the diencephalon. The diencephalon contains the thalamus and the hypothalamus
Deep inside the brain stem is the reticular formation, a network of nerve fibers that help regulate the brain's level of awareness. It runs up from the medulla oblongata through the pons and midbrain. Sensory impulses passing through the brainstem stimulate the reticular formation, which then stimulates activity and alertness around the cerebral cortex.
The medulla oblongata, found at the bottom of the brain stem, morphs into the pons above it. Below it, the medulla oblongata makes a transition into the spinal chord (at the foramen magnum). Sensory and motor nerve fibers that connect the brain to the rest of the body cross over to the opposite side in the medulla oblongata, which is why the left part of the brain oversees the right side of the body and vice versa.
The pons can be identified as a bulge in the brain stem right in front of the cerebellum. It consists of large nerve fiber bundles that connect the two lobes of the cerebellum. The fibers also connect each side of the cerebellum to the cerebral hemisphere on the opposite side. The structure's main purpose is to relay messages between the cerebral cortex and the medulla oblongata.
The midbrain contains relay stations for neurons transmitting messages to the cerebral cortex. It also has several reflex centers which input sensory commands and output motor commands. Relay and reflex stations for auditory and visual functions are found at the top of the midbrain. A pair of nuclei, the superior colliculus, controls reflex actions of the eye. Another pair of nuclei, the inferior colliculus, controls reflex actions of the ear. At the bottom of the midbrain are relay/reflex centers for pain, temperature, and touch. The red nucleus and substantia nigra, also found at the bottom of the midbrain, are associated with movement.
The thalamus and the hypothalamus are positioned beneath the cerebrum, connecting it to the brainstem. The thalamus is formed by two round masses of gray tissue, and it is found in the middle of the brain between the cerebral hemispheres. It receives most all sensory signals (except for smell), and sends out all motor signals.
The hypothalamus can be found directly below the thalamus at the base of the brain. It controls or is involved in many vital drives and processes such as eating and drinking, body temperature, sleep, emotions, and sexual activity. It controls the function of internal organs through the autonomic nervous system, collaborates with the pituitary gland, and helps coordinate brain stem activity.
The reticular formation is a formation of nuclei that runs up through the brain stem. It helps control respiration, cardiovascular function, digestion, alertness, and sleep. It also decide which of the constant flux of sensory messages are received by the cerebrum.