It depends on what's causing the headache. If you have a migraine normal Advil might not be good enough, try sitting in a dark room with no sound and see if that helps. Sitting in the same position for too long can also cause pretty bad headaches as can lack of water, lack of food and all sorts of other things. You sound like you've been studying a while, it might be time for a little break.