According to what I've read, the you say "headache" "dolor de cabeza". However, I seem to recall that one often talks about pain as being caused in an active manner by a part of the body, like "Mi cabeza me duele" (though I'm not certain on that conjugation). I'm therefore confused as to how you would talk about a headache and other such bodily ailments.
Generally, in English, when we are talking about pain, we use the noun "I have a headache" or "I have a stomach ache", although we can refer to the pain as a verb "my head hurts" or "my stomach hurts", it is not as common.
Alternatively, if we don't have a common noun to describe the pain (say in your arm), we use the verb, "my arm hurts".
In Spanish, "dolor de cabeza" (literally, "pain of head") would be the noun equivalent to "headache", as in "tengo dolor de cabeza", while, "me duele la cabeza" (basically, "the head is hurting me") would be the verb version.
From what I understand, both are acceptable, although the verb might be more common.