This is a quick guide to help you get started with soldering, and achieve reliable and good looking solder joints.
Tl;dr:
- Use enough heat – for the solder to flow nicely into the joint, both the PCB and the component contact need to be hot enough. With lead-free solder, a good temperature to start with is 330°C. With a decent soldering iron, the heating time will be very short, only a few seconds
- The solder needs to flow into the joint – most of the solder should be inside the hole (for through-hole components) and only a little of it should be above the surface of the PCB
- Let the solder solidify on its own – avoid blowing on it to help it cool down and make sure not to move the component. This could create a “cold solder joint” which might look OK, but it might not be making a good electrical contact and may fail sooner or later
- Don’t use too much solder – related to the above, there’s no point in having lots of solder above the PCB/on the component leg
- Avoid using too much heat – while the PCB and the component contact need to be heated properly, using too much heat could damage them. The copper layer on the PCB (“the pad”) could delaminate, and the component might fail due to being overheated. Try not to heat the PCB/component for more than a few seconds
You might want to refer to the excellent Adafruit Guide to Excellent Soldering, especially the Making a good solder joint chapter.