I would talk to a doctor since reasons for headaches can be harmless or serious, depending what is wrong.
My brother had migraines, and got tested for everything in the book and they ended up just being stress headaches. Once you figure out what is causing them, doctors can effecitively tell you have to get them to go away or at least help avoid them in the future.