Flux is a chemical cleaning agent that facilitates soldering, brazing, and welding. It does this by removing oxidation from the metals to be joined. In high-temperature metal joining processes, the primary purpose of flux is to prevent oxidation of the base and filler materials. It also helps transfer the heat evenly over the metal surface. The use of flux also allows solder to flow easily on the working piece rather than forming beads as it would otherwise thus making the hot metal much easier to work with.
In summary, flux has 3 main components;
1. Chemically- it cleans metal surfaces to assist the flow of filler metals over base metals and provides a protective barrier against re-oxidation and heat scale.
2. Thermally- it assists with heat transfer from heat source to metal surface
3. Physically- it helps in the removal of surface metal oxides.