How do I treat a burn on the top of the foot?

Cold,cover,call doc. Immediately with any burn anyplace, one should wash off the area with cold water to stop the burning process, and possibly prevent a first degree becoming a 2nd (blistering) or a 3rd degree (full thickness). Then cover area with sterile gauze, if available (don't use tape near the burn. Then call and have it assessed urgently for further treatment and infection prevention.
See a specialist. If you can not get into a foot specialist immediately, get into an urgent care. You want to ensure that you are properly treating the burn depending on its degree (thickness of skin involved), the mechanism and any involved structures.
Local wound care. Wow, foot burns are painful! . First do not put anything on the burn like butter or other condiment. Any burn larger than a 'quarter' should be seen by a physician or any burn to a hand, foot, face or genital area. Good local wound care includes: keeping area clean/dry and frequent dressing changes. If a blister develops, leave it. Tylenol (acetaminophen) for pain is helpful hope you are better.