Iron is most commonly mined in the form of iron (III) oxide (Haematite). Which is then put straight into a large blast furnace.
Inside the blast furnace many exothermic reactions take place so the iron ore is always hot enough to be a liquid.
The iron oxide is reduced using carbon dioxide. First carbon is roasted in air to form carbon dioxide, which is then reacted with more carbon to form carbon monoxide this is then blown into the furnace through pipes where it reacts with the oxygen in the iron ore to form carbon dioxide and iron.
Unfortunately the iron ore contains many impurities most importantly silicon dioxide (sand) in order to remove this calcium carbonate (limestone) is added. The heat in the furnace causes the limestone to break down forming carbon dioxide and calcium oxide. The calcium oxide reacts with the silicon dioxide to form calcium silicate (slag)
The slag floats on top of the iron forming a protective layer that prevents the iron from reacting with the air. If the layer of slag becomes too thick some can be tapped off and cooled into blocks, which can be used as insulation or as the foundations for roads.
Then magnesium is added to the furnace the remaining impurities react with it and float to the surface as part of the slag.
If the layer of iron becomes too thick it is tapped off into large containers called torpedoes each of which holds 250 tons of iron these are then taken to be refined into steel