Watching a flame dance through the air, you might conclude that fire's a gas, like oxygen or carbon dioxide. It's not. Fire can burn fuel that's a gas, or a liquid, or even a solid–as in the case of glowing charcoal. But the fire itself isn't any of these things. In fact, fire isn't any thing at all. It's not its own type of matter; it's something that matter can do. Fire is a chemical reaction.
A fire needs oxygen and some kind of fuel. This fuel–whether it's candle wax, wood, or gasoline–usually contains big molecules that have carbon atoms inside them. You can think of these molecules as little containers of energy. When they're allowed to combine with oxygen, this energy is released as heat and light.
Fire is a rapid chemical reaction known as oxidation. Inside a fire, oxygen molecules break bigger molecules apart into carbon dioxide and water vapor. All the heat and light of a fire comes from big, carbon-based molecules combining with oxygen.
So what is fire? It's not the fuel or the oxygen or the heat or the light. Fire is what happens between all these things. It's a chemical reaction.