Basically solder is a metallic compound (usually with a lead base) which melts at a "reasonable" temperature (in the low hundreds) with good electrical conductivity. So a small iron with a metal tip is heated up and melts solder which flows around the two pieces of metal, joining them. A chemical called flux helps the solder to flow nicely and properly join correctly. Usually for electronic work, the solder will have a flux core, making it a rather simple process. Use the iron to heat the two pieces of metal, then dab the end of a piece of solder in the join between the iron and the two pieces of metal or wire. The solder will flow nicely and join the two.