Forward-thinking builders or DIY-oriented home owners will often add dead-end pipes for water or drain lines to facilitate plumbing future additions, appliances or facilities. Most often, a simple pipe cap is glued to the end of the pipe, which will need to be removed before the connection to the new pipes can completed.
Plan and Cut
Turn off water at the main or secondary shut-off location if the cap to be removed is on a pressurized water line.
Advise anyone else in the house or location to not run water or flush toilets if the cap to be removed is on a drain line.
Plan the project so all the other plumbing is done or at least has shut-off valves installed. This way removal of the cap on the existing pipe and connecting to the new pipes can be done as quickly as possible, minimizing the time the existing facilities are unusable.
Forget trying to "unglue" the glued on pipe cap. Gluing PVC fittings to PVC pipe is actually a method of welding the plastic together. The pipe and fitting become one piece of plastic.
Use a PVC pipe cutter to cut through the existing pipe on which the cap is installed an inch or two back from the cap. A PVC pipe cutter works by rotating completely around the pipe. If there's insufficient room to work the cutter, a hacksaw can be used to saw off the pipe.
Move farther back down the pipe if, after the cap is sawed off, there will be insufficient pipe remaining to attach the new coupler on the end of the pipe on which the cap had been installed. You may need install new pipe and remove and replace additional tees, elbows or couplers to allow the new piping to be securely installed.