To treat a migraine, there are two main strategies: treatment of the acute migraine episode and then prevention of migraine episodes.
For many migraine sufferers, lying down in a darkened and quiet room at the onset of an attack can be helpful. Simple analgesia, such as paracetamol and ibuprofen can be beneficial, but it is always important to monitor how often you need these treatments - as overuse of pain-relieving medication can themselves cause headaches. Codeine containing treatments should only be considered following discussion with your GP, as headaches can occur frequently with codeine.
Some migraine sufferers also experience nausea and vomiting as well as a headache, and some over the counter treatments also contain a mild anti-sickness treatment to counteract this.
If over the counter treatments are not helpful in the acute phase of your headache, there is a type of treatment your GP can offer to take at the onset of your migraine. These treatments (sometimes called Triptans) aim to reverse the changes that have happened in the brain to cause the migraine. These can only be taken a certain number of times per month, however, and if you are using these treatments regularly then you will need to see your GP again to discuss whether a preventative treatment would be more appropriate for you.
Avoidance or managing triggers is also key to managing your migraines, as limiting your exposure to triggers where possible will help to prevent the migraine from happening in the first place.