Pin Holes: Pin holes often appear on the surface of solder joints. How are they formed?

Pin holes are formed as a result of moisture entrapment. All that is required is a tiny amount of moisture. When the solder comes in contact with the through-hole, component lead, wire or whatever is being soldered, the water boils and it forms a gas bubble that will either escape or be trapped as the solder solidifies.