In short, solder is an allow of tin and lead, with a fairly low melting point. It bonds to most metals when melted, making it useful for permanently connecting two pieces of metal.
You will need:
The printed circuit board (PCB) that you wish to attach an electrical component to and the electrical component.
Solder. I used 63/37 rosin core solder. The tube pictured cost about $1 and has 8 feet of solder, enough for almost any project. *WARNING* Acid core solder can damage electrical component.
A soldering iron. These come in many shapes and sizes, but are ultimately, nothing more than a bit of metal, a power source and a heating element.
A wet sponge. Keep some water nearby so you can keep it wet.
Step 1: Place the Component
Place the component with its leads through the appropriate holes (deciding which ones are appropriate is beyond the scope of this instruction), with the body of the component on the side without metal printing, and the long ends of the leads on the same side as the metal printing. If the component does not stay on its own, bend the leads slightly against the sides of the holes they are in.
Step 2: Turn on Soldering Iron
First, be sure it is plugged in and turned on.
*Soldering Irons get very hot. Never touch the tip or store with the tip in contact with a flammable materiel*
Step 3: Tin the Soldering Iron
If you apply enough solder that the tip noticeably changes shape, you have applied too much. Wipe the tip on your damp sponge to get the excess off.
*Every few minutes, you will need to re-tin the tip. Generally, if the tip starts turning a blueish-black color, it is time to re-tin.*
Step 4: Heat the Connection
Place the tip of the soldering iron so that it touches both the component's lead, and the metal printing on the circuit board. Hold it there for about 10 seconds and move to the next step.
Step 5: Apply Solder to the Connection
After the solder is on the connection, remove the soldering iron.