system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do some things burn while other things melt?
gpt
Melting is a state change in the absence of chemical reaction. In brief, heat up a solid enough and it will become a liquid, and heat it up more and it will become a gas. However, this means that the material isn't exposed to anything else that can cause a chemical reaction.

That "anything else" is, most of the time, oxygen. Atmospheric oxygen is very volatile and molecules of it can be broken down for more energy. You know how you'll often see oxygen written as O2? That's because the oxygen in the air is made of two oxygen atoms bonded together, and it's because of this bond that it can break apart, release energy, and then the atoms combine with other nearby materials to make new materials. That's the chemical reaction. So, if you heat up the material, and it's the sort of thing that oxygen can bind to, then you get a chain reaction where the oxygen molecule breaks apart, binds to the heated material, releases that energy in the form of more heat, so more oxygen breaks apart and binds, and so on, which is how things burn. 

When you're heating ice, it's never hot enough to get the oxygen to do its thing and the ice just melts. When you're heating iron, the oxygen can't really bind all that well to the iron in that case, and the iron melts. You might see some burning of material on or around the iron as it melts, but not the iron itself. When you're heating wood, the oxygen can bind to the wood, breaking down the cellulose and other components of wood and make ash, releasing its extra energy in the process, and the wood burns. This is also why things don't normally burn underwater, too; there isn't enough free oxygen to keep a chain reaction going. However, as you can tell by boiling food, those chemical reactions can still occur with its own materials, transforming raw food into cooked food.

Incidentally, this property of oxygen is why breathing is important, too. We use this break-apart-for-energy technique to stay alive, in a whole bunch of other, different chemical reactions.