Hair itself cannot feel pain. Hair strands are made of a protein called keratin and do not contain any nerves. Therefore, any pain you experience when manipulating your hair is actually coming from your scalp.
The scalp, being a part of your skin, is richly supplied with nerves that detect pain, touch, and other sensations. When you pull, tug, or even lightly stimulate your hair, it's the nerves in your scalp that register these actions and send signals to your brain, resulting in the feeling of pain.
However, pain in the scalp when moving your hair can be a symptom of other health conditions, such as headaches.
It's important to note that some people, especially those with red hair, may experience a lower pain threshold due to a genetic mutation. This means they might perceive pain differently and may require higher doses of pain relievers.