Mine were'nt painful though ..
I believe that sometimes its a cyst, a hard nodule may be a calcium build up , I think massage may help them go away, I had one under my foot which I regularly massaged , it disappeared after a while, also the palm of my hand, I assumed the massage dispersed it .. good luck