Thank you for the opportunity to help you with your question!
There are many causes of headache. However I will be specific in my answer so that I address the headache you have described.
Headache can be caused by poor posture in the following way.
Poor posture results in the creation of tension in your upper back, neck and shoulders, which can lead to a headache. As would be the case after sitting in certain position looking at your phone or tablet for hours.
Classically, the pain throbs in the base of the skull and sometimes flashes into the face, especially the forehead.
Please let me know if you need any clarification. I'm always happy to answer your questions.
Since the headache arises from poor posture, the first step would be to do some mild stretching.
also as a preventive measure you can use pillows to support your back.
Ideally you should take painkillers when you feel the headache but again prolonged use of painkillers can ead to kidney failure.
So, a change of posture, and perhaps a cold surface such as a pack of ice on your head should relieve the headache. If that conservative approach does not work then you should take painkillers.
Last but not least, if it is as persistent as you mentioned, it is advisable to visit your doctor so that he can ascertain if posture is indeed the cause or there is an underlying problem.
Content will be erased after question is completed.