Many medical conditions can cause pain in the ankles or feet, as a symptom. Some of the common conditions include:
Arthritis
Arthritis is a progressive and debilitating condition where the joints in your ankles or feet get very stiff, swell up, and become prone to injuries. Over a few years, you may lose mobility and experience intense, continuous pain.
Nerve damage
Your nerves are extremely sensitive. Any injury or stress can compress them and cause significant pain. Tarsal tunnel syndrome and sciatica are examples of nerve damage induced ankle/foot pain.
Additionally, if you are diabetic, your condition could cause diabetic neuropathy, where the nerves in your feet can get damaged, causing intense pain.
Vascular conditions
Blocked arteries and veins can cause pain and swelling in the ankles and feet. Specifically, conditions like peripheral arterial disease and deep vein thrombosis can cause cramping in the entire leg, including the ankles and feet.
Dermatological conditions
Extensive friction, sweaty conditions inside footwear, and microbial infections can lead to the formation of fungal growth, warts, calluses, and corns. Together, these can cause immense pain in your feet when you try to walk.