The ( CNS ) central nervous system consists of the brain and spinal cord. The brain relays most of the messages in the nervous system and communicates with the rest of the body through the spinal cord. From there, messages flow through the ( PNS ) peripheral nervous system, this network of nerves carries information to and from the CNS. The PNS is divided into two major parts, The somatic nervous system and the autonomic nervous system. The somatic nervous system ( SNS ) which carries messages to and from the sense organs and skeletal muscles generally controls voluntary behavior. In contrast , the autonomic nervous system ( ANS ) serves the internal organs and glands, activities within the ( ANS ) are mostly automatic. The ( ANS ) and ( SNS ) work together to coordinate the body's internal reactions to outside events. The ( ANS ) can be divided into the sympathetic and parasympathetic branches which relate to emotional responses like crying, heart rate and other involuntary behavior. The sympathetic branch is an emergency system that prepares the body for " Fight or Flight" in times of high emotions or danger and it arouses the body for action. Whereas, the parasympathetic branch helps keep vital process such as heart rate and breathing at moderate levels and is usually most active soon after an emotional event. In general, the parasympathetic branch quiets the body to return it to its lower level of arousal.
In reference to the question; What part of the brain and spinal cord and nervous system were involved, and in what order?
A sensory neuron ( the nerve cell that carries information from the senses to the CNS ) detects the pain from when the arm touches the hot kettle and instantly fires off a message to the spinal cord. Inside the spinal cord, the sensory neuron synapses with a connector neuron and activates the motor neuron ( a cell that carries commands from the CNS to muscles and glands). The muscle fibers are made up of effector cells ( cells capable of producing a response ) triggering a reflex arc ( causing an automatic response to remove the arm from the hot kettle , causing my exclamation ~ Ouch!). From there it transmits the message from the PNS through the somatic and autonomic nervous systems through the sympathetic and parasympathetic branches, which in turn relays the message through the spinal cord to the brain and central nervous system.
Reference:
Coon, D., & Mitterer, J. O. (2010). Introduction to psychology: Gateways to mind and behavior, Chapter 2, Brain and Behavior, pp 47-77, (12th ed ).