Thank you for your question and welcome to Just Answer.
You most likely have an abscessed upper back tooth. The dead nerve in this tooth has decomposed to the point that the tissue breakdown products have exited the root tip (which is in close proximity to the area in front of the ear), and initiated an infection. You initially need to get on some antibiotics which requires a prescription. Call your dentist and see if he can see you this afternoon in order to assess the situation and get you at least on some medication to start reducing the swelling. Hopefully he can treat the tooth today as well.
I hope this answers your question. If you would like to discuss this further or have any additional questions, please reply to my answer and I will get right back to you.
Sincerely, XXXXX XXXXX DDS