Shut off the water. Follow the piping under your toilet to the home's main drain line, referred to as the stack. Cut the pipe a few inches from the intersection to the stack and a few inches right after the elbow joint under the toilet, which is part of the flange pipe, with a diamond tipped blade on a reciprocal saw. Remove the sections of pipe with the help of an assistant.
Fit the PVC pipe into the iron pipe at both ends. Attach a PVC-to-iron pipe fitting at both ends around the iron pipe and PVC pip. This fitting is a rubber sleeve with a metal collar. Tighten the sleeve collar with a screwdriver to make a watertight connection.
Measure and cut the PVC pipe as necessary to complete your piping run. Fit the remaining sections of PVC together, using PVC adhesive to connect the couplings and pipe. Support the pipe every three feet with a PVC pipe bracket. Nail the bracket to the joists above the pipe with a hammer and nails.