Sudden quick action in response to something occurring in / environment is known as reflex action.
Reflex action is a rapid, automatic response to a stimulus which is not under the voluntary control of the brain, i.e. it is an involuntary action. It is a simple form of behaviour in which the same stimulus produces the same response every time, e.g.
(i) if we unknowingly touch a hot plate, we immediately move our hand away from it.
(ii) moving our foot away on stepping something sharp. Other examples are knee jerk, coughing, yawning, sneezing, etc.
The pathway taken by nerve impulse in a reflex action is called the reflex arc.
Reflex arcs have evolved in animals because the thinking process of brain was not fast enough during early stages of evolution. However, even after complex neuron networks have come into existence, reflex arc continues to be more efficient for quick responses.