Solder has been in use just about since the time the need arose to create a quick, low-resistance, and permanent electrical connection between current-carrying devices. Though many other means to make connections have been invented and are in common use, the quality and performance of a proper solder connection has never been exceeded.
The reason solder is superior to plugs or connectors is because it creates a "gas tight" seal at the point of connection. Excluding oxygen, moisture, and contaminants from the point of contact precludes the possibility of corrosion creating a resistive path to current flow. High frequency alternating current tends to flow near the surface of a conductor. A coating of oxide on the surface can attenuate these high frequencies (in theory).
Solder used for electronics is most commonly a mixture of 60/40 lead and tin, melts at no less than about 361° F, and has a "rosin core" called flux. Solder is manufactured with the core of flux running through the center. This rosin flux melts and flows onto the metal being soldered removing oxidation from it. In years past, flux was a separate product which had to be applied prior to applying solder.
Flux allows the solder to contact clean, bare metal. The tin in the solder will actually permeate the surface of the metal allowing it to stick. Solder used for plumbing work or other purposes should never be used for electronics as the flux material is very acidic and will corrode leads and connections very quickly. There are other electronic "specialty" solders such as lead-free or silver-bearing solder for critical applications such as CMOS or digital integrated circuits. For the majority of applications, standard solder is more than adequate.
Soldering is not at all difficult to do, but it does take a little practice to get a consistent, reliable solder joint every time. Do not think of solder as a "hot melt" glue. For a reliable connection, the solder joint should not support weight or hold parts together. Once melted and applied, solder is no longer soft and flexible, but hard and somewhat brittle.
Allow your soldering iron enough time to reach full temperature, usually about 5 minutes. Start by heating one of the conductors to be soldered while holding solder in contact with it. Turning the soldering iron tip to maximize contact surface area will speed heat transfer. As the metal reaches the melting point of the solder, the solder will of course begin to melt into a bead or drop. Once the metal exceeds the melting temperature of the solder, it will "flow" onto the surface or "wick" into the strands of wire. If it continues to stand like a bead of water, the metal is not yet hot enough for a good connection.
Once the solder has begun to flow, bring the other part to be soldered into contact with the melted solder and iron tip. The melted solder will transfer heat quickly as it contacts the surface of the metal. Continue to apply heat until the solder flows onto the second part and takes on a shiny appearance. Remove the solder and iron. As the heat sinks away through the metal, wire, etc., the solder will solidify quickly making a sound connection. If any portion of the solder joint appears beaded or standing on top of the metal, reheat until it flows properly.
When soldering on printed circuit boards (PCB), take care not to overheat the solder "pad" as it may delaminate from the PCB. Do not push or pull on leads. Though you may end up getting a good solder connection from the wire or lead to the loose trace, the foil trace will likely break at some time if left supporting the weight of even a small resistor. Bending the lead over on the component side of the board can help relieve any stress or weight upon the fragile trace.
Never attempt to solder together a broken trace on a PCB. The best repair is to use hookup wire (22 gauge solid wire is good) as a jumper around the break. Locate the nearest solder pads on both sides of the break and join them with the wire. If the trace is wide enough, it is possible to scrape away the insulation on both sides of the break in the trace and solder a piece of wire across it. Using a wire jumper is still the best repair.
Sooner or later, you will have the need to solder a connector that is mounted in plastic. Overheating causes results you can easily imagine! The trick is to place a small alligator clip, fine hemostat, or soldering heatsink clip, between the area to be soldered and the plastic. The idea, of course, is to create a path for the spread of heat elsewhere than to the plastic. You will still need to use caution not to heat more than absolutely necessary, but this generally works pretty well in preventing a meltdown.
It is always a good idea to test a new solder connection with a continuity tester or volt-ohm meter before moving on. A proper- looking solder joint may not actually be good, and could be very difficult to locate later on as an open or intermittent in the circuit. Re-melting the solder on the connection will usually correct a "cold" solder joint. A pocket of flux or a connection not heated enough is usually the culprit.