It's okay to walk on the sprained ankle some as long as you haven't broken any bones in the foot or ankle when you sprained the ankle.
Walking some on the sprained ankle is okay but just take it easy and if you're in pain then stop walking and allow your sprained ankle to heal some more before walking again.
Sometimes walking can help the sprained ankle and other times it may make the sprained ankle worse.
A mild ankle sprain takes around 6 weeks fully heal.
Most mild ankle sprains heal with some ice and rest within 6 weeks and rarely need medical treatment or an emergency room visit.
For a more severe sprained ankle it may require an emergency room or doctors visit and medical treatment.
If the ankle sprain is more severe then it can take 2 to 3 months for the sprained ankle to heal.
When I've had a mild ankle sprain it healed with use of some ice and rest within 6 weeks.
You should rest as often as possible and not walk too much on the sprained ankle and take it easy until at least 4 weeks.
Then gradually return to any normal activities that you normally do.