I had a very similar pain a couple months ago. It ended up being a ligament that was swollen. When I wasn't on my foot it was only a mild discomfort but I couldn't walk at all. It was a horrible pain. The pain only lasted about a couple weeks, but it was HORRIBLE. I would suggest that you go to the doctor and get it checked out though because it may be something else. I hope you feel better soon
Foot pain is perhaps one of the most annoying pains.
Hope you feel better