It is important to understand the anatomical reason for this. Depending on the distance, duration, you could be putting pressure on the nerves on the lateral and medial aspect of the foot; namely the :
1. medial plantar nerve
2. lateral plantar nerve
This can be due to pressure on said nerves during physical exercise. If your pain continues, it is advised to visit your podiatrist and perhaps give you some tips to buy appropriate footwear.
if you wear stability (motion control shoes), sometimes they can push your foot towards the outter side and cause foot pain.
get a neutral running shoe.
if the inner sides of the foot hurt, you may be pronating and experiencing fascial strain.
in this case, you will benefit from orthotics.