Headaches can also be caused by problems with teeth, the digestive tract, neck or back muscles or completely other things like poisoning. Not sure about the digestive tract, but it must be "there somewhere" (intestine, stomach). Also, the poisoning is just a weird guess.
Drinking a glass of water won't do the trick, because dehydration is usually a long-term phenomenon. Usually from too much salt(y food) or other substances that stress the kidneys. The body needs time to absorb the water. You should change your diet and drink more water. (I like to apply honey.) Don't drink too much. You have to raise the amount over a period of time, so your body can accustom to it.