how we feel pain

you prick your finger on something sharp. This causes tissue damage, which is registered by microscopic pain receptors (nociceptors) in your skin. Each pain receptor forms one end of a nerve cell (neurone). It is connected to the other end in the spinal cord by a long nerve fibre or axon. When the pain receptor is activated, it sends an electrical signal up the nerve fibre.
The nerve fibre is bundled with many others to form a peripheral nerve. The electrical signal passes up the neurone within the peripheral nerve to reach the spinal cord in the neck.

Within an area of the spinal cord called the dorsal horn, the electrical signals are transmitted from one neurone to another across junctions (synapses) by means of chemical messengers (neurotransmitters). Signals are then passed up the spinal cord to the brain.
In the brain, the signals pass to the thalamus. This is a sorting station that relays the signals on to different parts of the brain. Signals are sent to the somatosensory cortex (responsible for physical sensation), the frontal cortex (in charge of thinking), and the limbic system (linked to emotions).
The end result is that you feel a sensation of pain in your finger, think ‘Ouch! What was that?’ or something similar, and react emotionally to the pain; e.g. you feel annoyed or irritated.