There are different types of neurones that work together in a reflex action. This is an automatic and rapid response to a stimulus, which minimises any damage to the body from potentially harmful conditions, such as touching something sharp or hot.
All reflex actions follow an overall sequence through the nervous system which is called the reflex arc. Crucially this does not involve the conscious part of the brain, which makes it much quicker. This in turn reduces damage to the body.
These are the steps in the reflex arc in more detail:
A receptor in the skin detects a stimulus (the change in temperature).
Sensory neurones send electrical impulses to relay neurones, which are located in the spinal cord. They connect sensory neurones to motor neurones.
Motor neurones send electrical impulses to an effector.
The effector produces a response (muscle contracts to move hand away).