The simplest way of smelting iron is a bloomery furnace. This is essentially a beehive shaped structure, covered in clay and containing alternating layers of charcoal and iron ore with openings top and bottom to allow a controlled airflow through the stack.
Iron ore comes in several forms but is essentially various iron oxides mixed with silicates. The chemistry behind a bloomery furnace is that the burning charcoal creates both a high temperature and a carbon rich atmosphere inside the furnace in which oxygen is taken away from the iron to react with the carbon (reduction).
At the end of the burn the furnace is taken apart and if the process is successful there should be a porous mass of metallic iron mixed with silicate slag, called a 'bloom'. Depending on the quality of the ore and the exact conditions in the furnace there may also be a certain amount of steel of varying carbon content.
This bloom must them be re heated in a forge and repeatedly hammered and folded to create a usable material. The end product of this 'fining' process is wrought iorn, a composite of more or less pure metallic iron interspersed with fine fibres of silicates. This can either be used as it is with similar properties to mild steel or further processed by carburisation to make steel.
A development of this process involves a rather more sophisticated furnace fed with forced air which both reduces the ore and diffuses carbon into the metal, creating cast iron which has a significant carbon content (around 3-5%) and consequently a low enough melting point (around 1200C) to be cast. Usually the raw 'pig iron' from a furnace needs to be remelted to produce a usable pure material.
Producing good quality steel requires additional steps as you need to precisely control the carbon content of the resulting alloy.