I would see a doctor if I were you, a professional should always be consulted when there are long term problems, especially with feet, you need those to walk around! It sounds to me that you either have a chronic foot problem, or perhaps you sustained an injury and it hasn’t healed right.
Often people notice that if they have a problem with one foot or leg and they continue on just accepting that pain, they will have either a similar pain or a new pain in the other leg or foot. If you have pain on one side you will automatically favour the other side, which could easily cause new problems to arise.
Insoles will help you, although if you visit your doctor they will be able to rule out any potential damage to your foot. You may have had a break that healed poorly, insoles won’t fix that. Your doctor will also be able to tell you which insoles will be the best for you.
Good Luck!