Fixture shutoff valves can often become useless, as they get old. They can easily become corroded and seized up, or the washer can become brittle and deteriorate. Either way, the shutoff valve will not work, or worse it can start to leak and cause property damage.
Replacing the shutoff valve requires cutting into the potable water system, and so it is best to hire a licensed plumber for this. However, if your plumbing skills are sufficient and you have the right tools, you may be able to tackle this project yourself.
There are multiple types of potable water systems, and thus multiple types of shutoff valves that go with these piping systems.
No matter which type of shutoff valve you are replacing, there are three preparation steps that must be taken for all of them. First, shut off the main water supply to the house water system and drain the system at the lowest possible point. Often a hose faucet or basement faucet will do for draining the system. Next, remove the supply line that attaches the shutoff valve to the fixture. See the article for replacing a supply line. Then finally before you remove the old shutoff valve, open the valve and make sure the water is drained out into a small bucket or towel.
The most common piping and shutoff valve is copper tubing and sweat style shut off valves that are soldered onto the copper pipe. If you have never soldered or sweat fittings onto copper before, then it may be best to call a plumber! Or practice using the soldering copper pipe article. If you are confident in your soldering skill, then proceed as follows.
Cut the old valve off of the copper tubing using a mini tubing cutter or hacksaw as close as possible to the valve body itself. Make sure that there will be enough piping still left to solder on the new valve. If there is very little pipe showing, then you may to have to heat up the valve to soften the solder that is holding it on and carefully remove it using pliers. This is fairly dangerous, so I caution that it is best to just call a professional plumber for this! Once the valve is removed, prepare the copper using sandpaper and flux and prepare the new sweat valve also. Slide the shutoff valve onto the pipe fully, and solder the new valve on. Once it is cooled off, you can shut the new valve and turn the main water back on to test it. Then simply connect a new supply line to the fixture and you are done!
When dealing with pex piping, cpvc piping, or iron piping, the valve to pipe joining technique will be different, but the principles are the same. Pex is usually crimped using a special crimping tool, cpvc uses a cementing process, while iron pipe uses threads and thread sealant.
There is also an easy trick I learned that is much simpler if you have an old brasscraft shutoff valve. You can take the packing nut and handle stem off of the valve body, and install the new handle and packing nut assembly onto the old valve body without bothering with all the pipe joining, sweating, etc.