You can buy paste fluxes in a can that you brush onto your work after cleaning and heating it. Most solders come with flux inside a hollow channel within the solder. Rosin core solders are for electrical work. Acid core are for working with sheet metal. Fluxes clean the surface of the items to be joined and make it easier for the solder to adhere to them. Without flux the solder tends to bead up and run away without sticking.