In a normal neck posture, there should be a forward curve which provides the balance between strength and mobility. However, due to whiplash and other traumas, the curve can be disrupted which as a result will damage the delicate ligaments and disks. Moreover, when a person bends their head forward to read or type, the neck begins to straighten and the weight of the head must be countered by the pull of the muscles at the back of the neck.
Let's say a person does this all day because they are studying or working on a computer, the muscles will always stay tense. They will experience knots, tightness and spasm of the muscles, which as a result will cause the neck to be in pain. Also, the muscles in return will pull the the base of the head, which will result in them feeling a tightness or pain around the head. This is what is referred to as a tension-type headache.
Furthermore, shoulder muscles are also involved because of close proximity and they are working hard as well to hold up the head, therefore, they will feel tight and sore. If this persists, the head posture can become permanent and develop into a round back. This will cause the spinal cord and the nerves to become stretched and result in pain over time. The end result of all of this will cause the spine to deteriorate prematurely and result in thin disks (degeneration).
To soothe the pain of a headache, a lot of people become dependent on pills which does block the pain but does not solve the underlying issue of the muscle pain. Therefore, it is important to have the cause of your problem properly diagnosed. It is best to consult a Chiropractor who has studied spinal problems that cause headaches and other tension-type headaches.