The foot and ankle are made up of many small
bones. In between these
bones, like any other joint like your knee or hip, there are small pads of cartilage that cushion the space between them.
Over time, these pads can wear away (osteoarthritis), and when the bones grind together it causes pain. I'm not saying this is what's happening, but it's one possible cause.