Cut the water off at the main supply to your house. This relieves pressure on the lines and keeps water from spraying all over you when you start to work.
Use a hacksaw or a ratchet PVC cutter to cut the leaky section of pipe out. A ratchet PVC cutter makes this job easy. You can buy one at your local home improvement store. It looks like a pair of pliers with a hook on one end and a blade on the other. It makes for an extra-smooth cut.
Clean your PVC pipe ends on each end of the cut out section and also clean your new piece of PVC pipe and couplings. When you fix PVC water pipes, use PVC pipe cleaner. This helps bond the glue to the fittings. You can buy PVC cleaner at your local home improvement store. It's usually a blue color, but some manufacturers vary color.
Fix PVC water pipes by replacing at least a 12-inch piece so that you can work your fittings together. Measure in between the piece you've cut out and cut a new piece about ¼ inch short of that length. This allows you to fit your PVC couplings in.
Use PVC glue and apply an ample portion to your pipe. Slide the coupling onto the pipe. Put glue on the new piece and slide it into the coupling. Repeat the same procedure on the other end.
Let the PVC water pipes you've just fixed dry at least 30 minutes. Then, turn your water back on and check for leaks.