First of all--have a drink of water.
(Often people get a headache if they have not had enough water to drink.)
If the headache doesn't go away then take a headache tablet--aspirin or panadeine are best for most people.
If the headache persists then rest, if you can, or better still, sleep for a while.
Most headaches go away quickly.
But if your headache is really bad and doesn't go away and you can't see a reason for it (like you have the flu, or a period, or you are worried) then see a doctor as soon as you can.
Of course, if your doctor has already told you that you get migraine headaches then your doctor will have already given you advice about what to do.
So do it.