There are so many possible causes of a headache, it is really impossible to give you any accurate information. Headaches can be caused by anything from stress and eyestrain to a brain tumor. What you do for a headache depends on the cause.
Are you talking about a garden-variety headache that might occur once in a blue moon and lasts only a few hours? An intense headache that is accompanied by other symptoms? A chronic headache that never seems to go away?
It's best you contact your doctor, describe your headache symptoms, and see what they advise.