Turn off the water supply. Put down towels and a water bucket to catch any drainage from the cut pipe. In both valve replacement jobs and new installations, cut the PVC or copper pipe with a pipe cutter after measuring and marking the gap required to insert the new valve with the cut ends firmly into the end sleeves. With a PVC installation using a ball valve threaded at both ends, the gap must be wide enough to allow for the valve, two short, single end-threaded PVC pipes screwed into each valve end and two smooth socket PVC connectors to close the gap.
Smooth all cut ends with emery cloth. Whether the copper connections are going to be sweated on with solder and a blowtorch or the PVC pipe is joined with cement, the secret to a water-tight installation is clean pipe ends. Apply plumber's tape to the threaded pipe if you want to be able to unscrew it later. Brush PVC cement on all connections after double-checking all measurements. Screw the cut PVC pipes into each end of the valve using two wrenches to counterbalance the torque applied to the pipe. Seat all smooth socket connections.
Remove the heat-sensitive, plastic-coated valve actuator handle from the top of the shaft before coating each pipe end with flux. Install the ball valve between the two cut pipes and firmly seat the pipe ends into the valve cup ends. Check the work area for combustibles before igniting the blowtorch. Light and adjust the blue flame to 1-1/2 inches. Put on an oven mitt then grasp one end of the valve and gently push it toward the end being soldered to firmly seat the pipe end before soldering.
Heat the bottom of the valve end cup while keeping the flame pointed away from you. Hold the end of the solder to the top of the end cup where the pipe enters the socket until the connection is heated enough to start melting the solder. Without having to move the solder, it will "sweat" into the socket around the pipe. Allow it to cool then do the opposite end cup. Turn on the water and check for leaks.