In the given passage, it's mentioned that when iron or steel is heated to a high temperature, oxidation occurs, resulting in the formation of a film of oxide on the heated surfaces. To address this issue, a flux is applied to the heated metal. At welding heat, the flux melts, and the oxide particles, along with any other impurities present, are dissolved in it. Therefore, the purpose of the flux is to dissolve oxide and other impurities from the metal surfaces during welding.