What tests are used to find out if I have migraine or other headaches?

Could be anything. Headaches could be due to simple migraines or more sinister causes. It is difficult to say without more information and examination. It could be a tension headache, a viral infection, due to poor eyesight, or an underlying tumor. In short you need to see a Dr who will take a history and perform an examination, if needed you will be referred for a CT scan as well.
History . Migraine is diagnosed by your history. Classically migraine is associated with an aura, nausea and/or light sensitivity. But there a number of migraine variants. Imaging is not necessary to diagnose migraine but there is often a pattern on MRI that is suggestive of migraine. More often imaging is ordered (ct or mri) to rule out another cause of headache.