A couple of helpful tips for repairing a ball valve are buying all the supplies needed ahead of time and turning off the water supply to the pipes that require work. Also, after the new valve is put in, the water should be turned on to check for leaks.
Many pipe systems use a ball valve to regulate the flow of cool air, heat and water, however the most-common use for a ball valve is water. First, find out what type of pipe needs work. If it is a copper pipe, then plumber's tape or sweat pipe joints is needed. If the pipe is PVC, pipe cement can hold it in place.
After the water supply is shut off, turn on the faucet that is connected to the pipes to allow all water pressure that is sitting there to drain out. If a sink is being worked on, the pipes can be accessed underneath it. If it is a bathtub or shower, access the pipes accessed through either the basement crawlspace or by cutting the wall to which they're attached.
A hacksaw can be used to cut the pipe in order to remove the old ball valve. The pipe can be cut on the sides and does not need to be cut directly besides where the valve is. After securing the new valve and closing the pipes, turn the water and the faucet on again. Check for leaks and if there are none, turn the water back off and close the wall that the pipes are in.