How do I treat swollen lymph nodes behind both ears?

Find the cause. Swollen lymph nodes are reactions to illness or disease, and determining the underlying cause requires physical examination and some tests. See your doctor; this is probably nothing major but it requires checking.
See an ENT physician. There are many different reasons for swollen lymph nodes in that area. You should see an ENT physician to determine the cause and to recommend if treatment is needed.
Don't ... ...Treat the lymph nodes. You need to find out what the cause is and treat that. See your doc.