Primary headaches are easier to prevent. Knowing your triggers can help avoid situations that lead to headaches or make them worse. Pain management techniques are skills you can learn to help you cope with your headaches.