When soldering, the smoke that is formed is mostly from the flux, in short, Flux is a cleaning agent used during the soldering process of components. Its main purpose is to prepare the metal surfaces for soldering by cleaning and removing any oxides and impurities.
The are three main types that we would carry along with some more specific use types:
Rosin Activated, Water soluble, and No-Clean Fluxes. Those can be found here Flux, Flux Remover | Soldering, Desoldering, Rework Products | DigiKey
Rosin is a resin contained in solder flux and can be hazardous to your health . Exposure to rosin can cause eye, throat and lung irritation, nose bleeds and headaches. Repeated exposure can cause respiratory and skin irritations, causing and aggravating asthma. so as little exposure as possible is the best precaution. Use rosin-free and lead-free solders whenever possible.
Water soluble and No-clean fluxes consist of more organic alcohols and acids, but safe soldering practices should still be followed when doing any soldering because there is always going to be fumes and smoke. I dont want to give the impression that No-Clean flux is ‘safer’, as some no-clean flux contains chemicals like methanol among other things which aren’t good to inhale either. When working with any mentioned types you should always read the Material Safety Data Sheet and follow exposure guidelines
Always do your work in a well-ventilated area or if possible use a fume extraction system. Avoid breathing the fumes and smoke by keeping your head off to the side of your work, not right over it. Digi-Key carries a good selection of Fume and Smoke extractors which can be viewed here Fume, Smoke Extraction | Soldering, Desoldering, Rework Products | DigiKey