Plenty of solder wire is flux core these days. It's basically a metal tube with flux inside. Back in the day this wasn't the case so you had to add the flux yourself. Nowadays it's typically not needed so long as you size your solder gauge correctly. Super fine solder doesn't have much or any flux, and if you're trying to solder huge pads or vias you're gonna have a hard time.
Flux helps heat transfer. Think of it like oil in a frying pan. It conducts the heat from the iron to the solder joint better than just bear contact. For non-delicate components it doesn't matter too much, but if you're working on ICs you don't wanna cook them before all the joints are good. There are also some oxidation inhibiting properties. Ya don't want oxidation on your joints!





