Welcome and thanks for posting your query to HCM.
After reading your query I can make out two of the diagnosis as you haven't told us exact time since the hard spot is their and any symptoms of pain or redness
over the same.
1. Infected Sebaceous cyst: this is due to a blockage in a sebaceous gland(produce oil in the skin) which leads to collection of cheezy material in it. It is not accompanied by any pain or redness in general if it is not infected.
2. Pyoderma/ Folliculitis- This is again due to blockage in a sebaceous gland but along with inflammation and infection of hair root. It is accompanied by pain and redness.
As you applied heating pad
over any of the above so it caused discharge to come out of it. Any how don't try to scratch it or pinch it, if still there is pain or discharge then can take pain killer or antibiotic under medical guidance and also avoid heating pads as it can cause further inflammation and other complications.
Hope this information will help you
Dr Sanjay K Kanodia