Thank you for your question.
Pain on the top of the foot, with a cracking/grinding noise, is very likely to be
tenosynovitis, which means swelling and
redness of the tendons. Tenosynovitis in the feet can be caused by shoes that rub on the top of the foot, walking more than usual, new shoes, or "just happen."
Pain down into the joints with cracking and grinding noise may be some sort of
arthritis. A
sprain or
fracture usually has a specific cause - you know what you did because it hurt right away. There are stress fractures, which occur gradually over time with a lot of walking or running, but those are usually at the bottom of the foot, such as the base of the metatarsal leading to the little toe.
Symptoms such as you are describing will often improve with relative rest (you don't have to go to bed, but don't do as much walking as usual), taking some
acetaminophen as needed for pain, elevating the foot when you are resting (putting your foot up on a pillow for a while, when you can), and using ice. Everybody has their favorite way to use ice. As long as you put ice on the area for at least 5 minutes 4 times a day, and don't leave ice on more than about 15 minutes at a time, you should be fine. It's generally good to put some sort of cloth between ice and your skin to keep your skin from getting irritated.
If you try ice, rest, and
tylenol and your foot is not getting better after another week or two, or if your symptoms are getting worse, you may wish to let a physician take a look at it.
I hope I have answered your question. If you have any further questions I will be happy to help. I hope your foot is much better soon.