Cut the leaking part of the pipe. Then get two couplings and some more pipe. Chamfer the ends of the pipe, then use PVC pipe primer to clean the ends of the pipe and the inside of the fittings. Apply PVC glue and join the pipe back together. Make sure you do a quarter turn for it to adhere.
In order to stop a leak in a pvc pipe, you have to find the leak, turn off the water to that pipe, cut out the broken piece, and glue in a new piece using two couplings and pvc glue. Let dry, and turn on the water.
There are 2 ways of stopping leakage on a pvc pipe. 1) stop leakage with pvc adhesive. For this stop leakage / outlets or inlets. Clean the surface. Then apply pvc adhesive. Do not use the pvc pipe for 3-4 hours. 2) replace the pve pipe if required and cannnot be stop leakage by using adhesive.
If the pipe has a hole or crack cut it out and replace it. If the join leaks the pipes will need to be taken out also and new pieces install. Make sure to clean the pies and dry fit before gluing. Then follow the direction on the glue container.
You will need to replace the portion of the pipe that is leaking/cracked/or has a hole with a fresh piece that is in tact. Cut out the bad piece/lenth and replace with length and couplings at both ends.