How do you tell what kind of headache you have?

Best left to a Pro. Some of the variables that you need to share with them are inciting factors llike food, or environment, how long you have had them, any change in severity, location, character like throbbing, constant or pressure, other associated symptoms like dizziness, nausea, paralysis or weakness of any muscles or functions like speaking or swallowing, and what treatments you may be using for relief.
See your doctor. This is a problem that necessitates a face-to-face meeting with your doctor. This will allow him/her to examine you, ask specific questions. And possibly order tests to find out what's wrong and what to do to help you.