Lump which is hard and painful could be an abscess, folliculitis (hair follicle infection), an infected cyst, an inflamed lymph node or a neurofibroma (localized harmless swelling in of nerve and connective tissue). The inflamed nodes settle down with time. However, it is important you consult a doctor and get this examined. If it is an abscess or infected cyst, it will need to be drained. If it is hair follicle infection, it will need warm compress, antibiotics and anti-inflammatories. Neurofibroma that is causing pain will need to be excised.
Since I cannot examine you and know other related conditions you may be having, nor is a detailed history possible on net, I have listed the various possibilities that should be looked into. Please consult your PCP immediately. Take care!