It is difficult to let you know exactly what this is without examining you and getting more information.
This could be an external ear infection that has extended to involve the skin of the ear, a middle ear infection, sphenoid sinusitis or worse. You can take a tylenol (acetaminophen) or Motrin to alleviate pain temporarily, but i recommend that you see your provider asap. If your headache is severe, go to er.
Would you like to video or text chat with me?