Hello and Welcome to HCM,
Thanks for writing to us.
According to your description , pain and swelling over foot seems to be inflammatory in nature.
It could be an acute attack of gout
.It could be a stress fracture
I advice you to give you rest to the part affected, take anti-inflammatory drug like motrin
1 tablet with food as and when required (upto 4 tablets daily) to reduce pain and inflammation and consult your doctor for thorough examination of foot and necessary investigation.
Hope this helps you.
Wishing you good health...
Dr Saurabh Gupta.