None medical headaches are usually associated with dehydration, hangovers are the prime example. Drinking plenty of water through the course of a day will help if you get regular headaches.
On a less serious note and a more enjoyable cure; Sex. Yes, it has been scientifically proven that the adrenalin and other chemicals released by the body during sex relieves many symptoms of various illnesses and will cure your headache. If it doesn’t at least it will have taken your mind off it for a while.