What could cause the sharp pains in my foot?

Not enough info. To answer this question we would need to know your age height weight how often this happens, what you do to make you feel better. After any changes in the color of your foot thickness of the skin, etc.
Many things. It can range from injury to tendonitis to neuritis. You should see a doctor.