There are three main types of fluxes in use today: rosin flux, organic acid flux, and inorganic acid flux.
Rosin flux is the oldest and still one of the most common fluxes used for electrical components. It is only active when heated, and generally safe for unheated electrical circuits. Rosin flux can be cleaned using an isopropyl alcohol solution.
Organic acid flux is also commonly used for soldering electrical circuits. This flux cleans oxidation on electrical leads much more quickly. It is very important to clean
this flux off electrical circuits because it leaves residue which will conduct electricity, causing shorts in your circuit. Organic acid flux is water soluble and can be cleaned with water.
Inorganic flux is used on stronger metals such as copper and stainless steel. It is not commonly used in electrical circuits, instead being used mainly for plumbing applications.
There is solder is available with flux inside the wire, called flux core solder 240. Flux core solder has flux in the center of the solder wire. Additional flux is unnecessary for most applications, but using additional flux still may make the solder easier to work with for some tasks. When selecting flux core solder, it is important to use rosin core solder for electrical applications. Acid core solder should only be used for plumbing applications.
Overall, I recommend rosin flux because it is most commonly used for soldering electrical circuits and is intended specifically for that purpose.