The "spur" comes from bone formation in the soft tissue attached to the heel, the plantar fascia.
This is due to degeneration of the tissue as well as chronic low grade inflammation
. The spur itself is not felt to be the primary cause of the pain. The pain comes from the soft tissue. Time and plantar fascia stretching exercise can help. Injections may have some benefit. Surgery is rarely needed.