If you have sustained an injury or if you simply feel pain in your ankle, you should refrain from putting pressure on your foot. This means that you should avoid walking over long distances.
The best thing that you can do when having a painful ankle is to rest. However, if the pain persists or if it does not show signs that it is improving after a matter of weeks, it is recommended that you visit your MD.
Similarly, if you are dealing with an ankle injury and the swelling does not go away after five days of at-home care, you should go to a doctor immediately.
In the case of minor injuries, you should place an ice pack on your ankle for about 20 minutes every day. To reduce swelling, you should keep your foot in an elevated position. If the pain is an issue, you can use over-the-counter pain medication such as ibuprofen.