When magnesium is burned, it reacts with oxygen in air not with the fire. The fire is the energy needed for the reaction to happen. Magnesium reacts with oxygen forming magnesium oxide. The light emitted from the reaction is because the reaction produced a lot of heat.
The substance doesn't have a specific name. We just say that that substance is being reduced. Remember this mnemonic - OILRIG where "Oxidation is Loss, Reduction is Gain" of electrons.
Answer to the Question
C. Barium phosphate