The application of ice or heat on an aching muscle depends on the stage of the injury. All muscle pain is not created equal. Ice is best used on acute injuries that have just occurred (up to 48 hrs.). Heat works well on chronic injuries that are reoccurring.
Facts about Icing
Ice and heat can also be use alternately to act as a pump for faster healing. Inflammation is reduced by the ice and then new oxygen is brought back in to heal from the heat. This is most effective for sub acute injuries (after the first 48 hrs. that an injury occurred).
Here are directions to combine both ice and heat.