What does the flux do?

It cleans the surface prior to soldering. It prevents the oxidation of the metal. And it allows the solder to flow freely.