Parotid vs. node
A tender swelling under the ear
could represent either an infected lymph node or an enlargement of the parotid gland.
Either way it is something that an ear nose throat doctor needs to examine and identify the cause and the source of the problem. The fact that it causes pain suggests it is more likely inflammatory (infection), but it could represent a growth, thus the need for proper diagnosis.