Yesterday I got a sharp pain right under my right foot in the middle part. What was it from?  

Plantar fascitis. It could be due to plantar fascitis or due to a heel spur.
Plantar Fasciitis. Most commonly inflammation in the plantar fascia which extends from the heal to the toes and maintains the arch in the foot. This is easily inflammed just from walking and standing. Makes sure you have good shoes with good arch support to prevent problems with this if the problems persists see a foot specialist or your family physician for further advice.