If its an injury, ice for the first 24 hours is the correct way to go. Since the ice constricts the vessels, it helps to minimize swelling and leaves less fluid in that immediate area for your body to clean up. After 24 hours, you're going to be swollen as much as you're going to get, and now your body is beginning to clean things up- after those intial 24 hours, heat is the way to go since it dialates your vessels and allows for more blood to get to the area and speeds up the rate at which fluid is removed from the area.
If its just a sore back, I think that heat followed by stretching is a good way to go. If you have an injured back (say you pulled a muscle) I would follow the above advice. Each time you agitate an old injury you can re- ice it as well. Using ice on an injury older than 24 hours doesnt really do much in the ways of helping it heal.