Smelting

Smelting is the general term for getting a metal from its natural ore. Gold is an exception because it is usually found as a pure metal. Other metals, like iron, copper, zinc, and silver, need to be got from their ore.
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.
Beyond this, each metal has its own special methods. Producing iron from its ore is done in a blast furnace. Producing zinc or aluminium from their ores requires (in addition to heat) electrolysis.
Iron is smelted from iron ore in large reactors called blast furnaces. A blast furnace is a tall vertical structure which is fed with coke, iron ore and limestone. When hot air is blown in the blast furnace, the coke will burn and reduce the oxygen off the ore, producing bare iron and carbon dioxide. The limestone will bind off any remaining bedrock. The iron melts in the hot temperature and is tapped off in liquid phase at the bottom. It is then worked into steel. The limestone and bedrock form a compound called slag. It can be used for making bricks, concrete or road topping. Earlier methods include Bloomery.
Aluminum is smelted in electric ovens called electric arc furnaces. The aluminum ore is poured on the bottom of the furnace and electric current is led through the ore. The temperature rises so high that the oxygen separates, leaving metallic aluminum.
Copper is poured on naked flame which burns off sulfur and other impurities, leaving raw copper. Electrolysis uses electric current to separate the copper in big pools, which contain water solution called electrolyte. An electric current is led in the pool, and all copper will gather on the electrode called cathode. 
Metallurgy and especially smelting is a key to the early civilizations. The earliest evidence of copper smelting dates from between 5500 BC and 5000 BC. The sites are in Pločnik and Belovode, Serbia.