If this has been going on for more than a few weeks I would recommend that you go to see your primary care doctor
who will be able to help you figure out what is going on.
I can think of several possible explanations for the foot pain. First if you are a runner or otherwise engage in vigorous exercise, this could be a stress fracture
in a bone of the foot. This could be diagnosed with a simply X-ray
test by your doctor.
Second, if you are older or have had foot injuries in the past, this could be a bone spur on your heel bone. These are increasingly more common in middle aged people, especially those with prior stress fractures or other injuries. This can, again be diagnosed with an X-ray.
Finally, this could be plantar fasciitis. Plantar fasciitis is an overuse injury of the connective tissue in front of the heel bone, often common in people who are on their feet a lot. It is also common in those with flat arches or in those who over pronate (hence, your question about whether this might be from how you walk is maybe not too far off the mark).
Your doctor will be able to help reach a diagnosis and suggest treatment options.