I get headachea that last for three days. Recently one of my pupils stayed dialated larger than the other during it was scary. Why is this?

Emergency. A dilated pupil and headache can be an emergency, and you must see an ophthalmologist urgently. It can be due to disasters like carotid dissection and aneurysm and tumor. But most likely, its due to atypical migraine, adies pupil or a horners syndrome, which are usually benign.
Serious problem. There are many very serious conditions that can cause headache and a dilated pupil, so you need to get this checked out. If all the tests are negative, see your neurologist to check for a more benign conditiojn such as adies tonic pupil.
Emergency. You should see your ophthalmologist or get to an emergency room asap to ensure that there is not a potentially life threatening issue occuring.