You probably have either an infected lymph node or a blocked lymph node. The nodes are little filters that catch viruses and bacteria. If you get a buildup or a blockage it can be quite painful.
Pain in lymph node can happen due to variety of problems. A simple viral or bacterial infection and even cancer can be the reasons. Cant directly relate to anything.