Headaches can result from a wide variety of causes and there are over 200 types. They are generally classified as either primary or secondary headaches. Primary headaches like migraines and tension-type headaches usually have no underlying medical cause, while secondary headaches are caused by problems in the head or neck like infections, injuries, or tumors. Treatment depends on the type and cause of the headache, and may include lifestyle changes, medications, and treating any underlying medical conditions.