Caffeine and headaches have a complex relationship, and in fact, caffeine can relieve or stimulate headaches, depending on how much you consume and how often you drink it.