Your body feels pain by pain cells called nociceptors. Larger injuries make nociceptors more active.
The brain can make things feel less painful. The brain can also stop pain reflexes.
Neurons in the spinal cord recieve the pain signal and send the message to neurons that control your muscles. A signal is sent to your brain that makes you aware of the pain.
This is a motor neuron and is inhibited to help your arm move faster.
This is a motor neuron that activates a muscle. This muscle pulls your arm away from the hot stove.
This neuron inhibits motor neurons so the arm can move faster.