Fluxes are sued to chemically clean the surfaces prior to soldering. Cleaning the surfaces means to remove the oxide layer that is formed on the surface of the parent metal that allows the solder to come to direct contact with the parent metals and join them.
Fluxes usually have acidic properties that attack and dissolve the oxide layer. They can be removed by neutralising them by adding an equivalent amount of alkali to form a neutral salt or can be removed by washing in a hot, dilute soda (sodium carbonate) solution, followed by a hot water wash.