Refining is the craft of eroding any slag from the freshly excavated ore with the aim of purifying it to a more malleable form. The purified ore can be then smelted into ingots for easier transportation and processing.
There are mainly two methods for refining slaggy ore, which are hydrometallurgy and pyrometallurgy. The former makes an extensive use of alchemy in dividing the impurities from the desired material, while the latter method is the craft of eroding the slag by burning it in high temperatures.
Both hydrometallurgy and pyrometallurgy require a high level of skill, since disturbances in the delicate processes can cause either a violent chemical reaction or an extensive explosion, respectively.
During the later years of Kingdom of Avernum's existence, there always at least one active smithery near the volcanic fumaroles to the west of Tower of Magi; quite possibly because of both aforementioned safety reasons and the natural heat that allowed for easier craftsmanship and processing of metals.