The forge is a large metalworking furnace. It is used for smelting various metal ores gathered from mining. You do not interact with the forge, you just have to be in the vicinity of the forge to smelt.
They can be found around most dwarf towns and and other races' encampments, but occasionally at mob encampments as well. Forges are often found paired with an anvil (which has similar use characteristics).