Magnesium oxide is a compound which means magnesium chemically reacted with oxygen to create a new substance with new chemical properties. Compounds are usually referring to two or more elements that are chemically bonded to form a new substance that usually has different properties than the reactants that made it.
i hope this helps. Let me know if anything is unclear.