system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5 what happens when we get headaches and why does a glass of water sometimes cure it?
gpt
There are a lot of reasons for you to get a headache, but the one that pertains to the glass of water solution is that your brain needs water to survive. Your brain runs on various chemical reactions which require a balance of salt, and many other things, to stay regulated. If you don't have enough water, those chemicals become unbalanced, and your brain stops functioning properly. 

A headache is your body sounding the alarm bells that "something is wrong up here," and if the problem is dehydration then drinking some water will make it go away. It doesn't mean your brain is actually in pain, because your brain doesn't have pain receptors. You can poke someone's brain with a stick and they won't feel it.

Incidentally, this is why dehydrated people hallucinate, because their brain is chemically unbalanced from lack of water.