The primary difference between ferrocerium and magnesium is that ferrocerium is an actual fire starter while magnesium is not.
Ferrocerium is a synthetic material (which ferro rods are made of) consisting of various elements (typically 50% cerium, 25% lanthanum and 19% iron) that create sparks when scraped across rough surfaces, whereas magnesium ignites when sparks connect with it and create a long-lasting, extremely hot flame.
Another difference between the two is their temperature outputs. While ferrocerium creates sparks that can exceed 3000 degrees Fahrenheit, the flame created by magnesium produces heat that can reach temperatures over 4000 degrees Fahrenheit.
The two can be used together to create a long lasting fire with intense heat output.