The pains are a condition called Peripheral Neuropathy which has developed because of (typically) a number of years of high blood sugar.
By the time the pain starts the damage is mostly done.
It can be stopped or slowed from getting worse but it might be impossible to roll it back, if you keep your blood sugars below 7.8/140 pretty much all the time moving forward.
If the pain is minor then soaking our feet (hot water/Epsom salt may help), wearing diabetic socks/stockings (compression), staying off your feet as much as you can and keeping them elevate may work.
If the pain is chronic or extreme there is two common prescription medications Pregabalin (Lyrica) or Gabapentin (Neurontin) - both "non-opioid" nerve pain killers will help take away the pain but they will not fix or improve the actual condition.
Best to have a talk with your doctor.