Swollen glands can be very alarming when they show up without warning and then last for an extended period of time. With a swelling that has lasted as long as you describe, the best thing to do is make an appointment with your primary care physician
for an exam. Your doctor
can take a look at the lump and take a more detailed history to try and determine if any further steps are needed.
It is certainly possible that your body has been fighting off an infection, as there are extensive chains of lymph nodes throughout your head and neck and a swollen lymph node could account for the lump you are feeling. In addition, it is also possible for swollen or enlarged salivary glands to also form a lump in the area you are describing behind the ear. This can sometimes occur if part of the duct draining the salivary gland into the mouth becomes clogged. In addition, it is also possible to develop a soft tissue growth (such as a lipoma) in any area of the body. Once again, discussing your health history and any recent changes with your physician--as well as giving him or her the chance to examine the lump--is the best way to identify what is causing your symptoms and what to do next.