The process of smelting always involves heating the ore, and may also use a reducing agent like coke or charcoal. Most ores are oxides, sulfides or carbonates. This process removes the nonmetal part, leaving behind the metal. Ores are not pure, so a flux is added to carry away the impurities. Limestone is the usual flux for this purpose. It removes the impurities as slag.