In nature the ores of metals such as iron, copper, lead, aluminium, and other metals are found in impure states, often oxidized and mixed in with silicates of other metals.
During smelting, when the ore is exposed to high temperatures, these impurities are separated from the molten metal and can be removed. The collection of compounds that is removed is the slag.
Different smelting processes produce different slags. The smelting of copper and lead, for instance, separates out a great deal of iron silicate. Slag from steel mills contains calcium, magnesium, and aluminum.
Slag has many commercial uses, and is rarely thrown away. It is often reprocessed to separate any other metals than it may contain. The remnants of this recovery can be used in cement, roadworks, and as fertilizer.