Under my ear is swollen and it pains what's going on?

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.
Ear swelling. Tender swelling under the ear can be caused by a variety of cysts, simple skin cysts, and sebaceous cysts (full of oily, cheesy material). Occasionally a lymph node in the area (there are lots of them) will swell up in response to an infection in that area, and sometimes they become infected themselves. Finally, you could have a skin problem that got infected (ingrown hair, plugged follicle, etc.).