Using a coupling or a union to repair plumbing is fairly simple. But there is a difference between a coupling and a union in terms of black and galvanized pipe. A coupling is a solid fitting with female threads on the inside of both ends. It is used for joining two lengths of pipe together that are not locked in place and can be turned. A union is used when you are trying to join two pipes together that are fixed, thus unable to be turned. A union is very similar to a coupling, except that it can be unscrewed into two separate pieces and then screwed back together when both separate ends are attached to the two pipe ends that need to be joined. If you are using copper pipe, couplings and unions work very similar to those used on black or galvanized pipe, except that the coupling or union is "sweated" onto the pipe. For plumbing repairs, a union works best because it also can be used as if it were a coupling.
Locate where the repair needs to be made on the pipe.
Determine if the entire length of pipe can be removed or if it has to be cut and then removed.
Thread your new length of pipe into the existing fitting from where the pipe that was removed was attached. Odds are, if dealing with black or galvanized pipe, this old fitting will be a threaded fitting such as a valve, elbow, coupling or union.
Determine if the the other fitting from the opposite end of your old piping needs to be removed. You will want to have male threads on this end (threading on the outside of the pipe), so the union or coupling can thread onto the pipe.
Loosen the union by spinning the nut in the middle holding the two ends together.
Attach one side of the union to one side of the new pipe
Thread the end of the new length of pipe, the side without the union, onto the the fitting from the pre-existing pipe, the pipe that was previously attached to the pipe being replaced.
Line both ends of the union up and thread the union back together until it is tight.