A soldering iron is a good tool for multiple purposes. However there are different considerations to know before using one. Like it usually happens, newbies tend to experience common mistakes.
In general lines, as the subject is rather complex, four aspects are of main importance. First, the tip needs to be continuously “tinned” and this means adding a bit of solder in it, and always watch if that solder runs out for adding more. Failing to do it, gradually destroys the tip making it almost unusable.
Second, the solder alloy follows the heat, and without heat, it will not stick to the metal surface. So the soldering iron needs heating both areas of the joint, the part and the metal pad, or maybe also the wire and the metal receptacle in other applications.
Third, the diameter of the solder alloy influences the required time for melting. A 0.5mm wire goes melted almost instantaneously and this helps the process of adding solder to the joint fast and easy.
Finally, staying too much time in the joint could destruct the board, the parts, the insulation or whatever element, creating oxidation in the metals, and after, the solder doesn't stick to the metal. There are tools to clean the metal, and flux, the magical substance to avoid oxidation while heating the metals that also helps for cleaning the area and adds an extra degree of wetting.
A soldering iron with temperature regulation is recommended.