Heat and ice work differently in treating or relieving pain for an injury. In the case of a sprained ankle and most other acute injuries, you should use ice. Ice is the best choice for recent injuries where the main goal is to decrease inflammation or swelling. Heat is an assumed better choice as it feels better and may seem like it can help the distressed muscle or bone, it can actually do more damage.
Ice will constrict the blood vessels which decreases blood flow. This process will help to reduce the inflammation in the area. Rest, Ice, Compression and Elevation is the best start to treatment. After that, you should call a podiatrist!