Foot pain is usually caused by increased pressure on the bones of the feet, which can happen from injury, improper footwear, or ligament damage. Here are several thoughts I had
about what could be causing your foot soreness in that area:
1) Arthritis of the foot: especially in the proximal bones of the 3rd and 4th toe. This could cause pain "on and off".
2) Plantar wart: this is a wart that grows up into your foot instead of out, because of the foot being weight bearing. You will know if you have a plantar wart because it will be tender in one particular spot when you press on it. This needs a podiatrist for treatment.
3) Stress fracture or ligament damage from an injury to the foot/ bones: You do not mention in your question if you exercise, but many exercisers I know have had foot pain, especially if they are training hard or wearing old shoes. You may need to change your shoes or get inserts.
4) Does the pain occur around the time when you wear certain shoes? You may be wearing constricting shoes or high heels that are putting too much strain on your feet.
So, what can you do to help yourself? You can try tylenol or ibuprofen to see if that reduces the pain in your foot. You can try getting new shoes that have a wider toe area and a lower heel. You can also try to buy inserts to try and reduce the pressure off the ball of your foot. But, if you have done these things and they didn't help, I think the best idea would be to go and see a podiatrist for a full evaluation. They will be able to assess your foot and find out exactly what is causing your discomfort. They will also be able to recommend footwear modifications for your particular problem, and decide if inserts are needed in your shoes for support.