Galvanized pipes were once common in residential plumbing systems, but pipes made from other materials are now more popular, including copper and plastic. The white PVC pipes you see in outdoor plumbing systems are easy to find and to work with, but they aren't suitable for use with hot water, so when replacing galvanized pipes indoors, the plumbing code requires the use of CPVC instead of PVC pipes.
Standard CPVC pipes are cream-colored, and heavy-duty Schedule-80 ones are gray. You install PVC and CPVC pipes the same way, but you should not mix them. When replacing old galvanized pipes, it's a good idea to cut out and replace as many of the old pipes as you can. Galvanized pipes tend to corrode with age, which restricts flow and makes them vulnerable to leaking.
Retrofitting Water Pipes
The best place to transition to new pipes is at a female threaded connection, which could be at a tee, elbow or coupling. This will allow you to screw in a PVC or CPVC male slip adapter, which has male threads on one end and a smooth socket on the other. A male plastic slip adapter is safer than a female slip one, which has a tendency to split when you tighten it down onto metal. Even if this doesn't happen immediately, it could happen a year or two down the road, causing a leak and a major headache. If you end up having to transition from a male threaded pipe, use a galvanized coupling to create a female connection before making the transition to plastic.
To make the transition, start by cleaning the galvanized female threads with a small wire brush to remove any old thread sealer or other debris. Wrap plumbing tape clockwise around the male threads of the plastic slip adapter about three or four times. Tighten the adapter into the socket hand tight, then use slip-lock pliers to turn it through two or three complete rotations. Don't overdo it. You don't want to crack the plastic. Once the adapter is tight, glue a pipe into the other end, and you're ready to run the rest of your PVC or CPVC pipe system.
Connecting Galvanized and PVC Drain Pipes
Drain pipes aren't under pressure, so you don't have to be as concerned about leaks. You can make a transition in the same way that you do for water pipes, but it isn't necessary. If you have to make a transition in the middle of a pipe, you can do it without re-threading the pipe. Simply cut the pipe with a hacksaw, making as straight a cut as possible, then fit a Fernco flexible connector with the appropriate diameter over the end and tighten it down. Fernco connectors look like typical pipe couplings, but they're rubber and have a pipe clamp on either end that you can tighten with a screwdriver or socket wrench. Insert the PVC pipe into the other end, tighten the clamp, and you're done.
Because the surface of old galvanized pipes can have irregularities from corrosion, it's usually a good idea to spread a silicone-based sealer on the pipe before sliding on the fitting. The PVC pipe is smooth, though, and the rubber will make a good seal by itself, so you don't need to spread sealer on it.