Things You'll Need
Toilet valve kit
Wet-dry vacuum (optional)
When operating normally, a toilet is a modern convenience few of us give much thought to. A toilet that won't stop running, or one that causes a jackhammering or rattling noise after you flush it, is typically the result of a faulty valve. You can fix the problem yourself, though you may require an experienced plumber to address it if you're uncomfortable handling minimal repairs.
Repairing the Valve
Turn off the water supply to the toilet. The valve should be located behind or below the toilet tank. Turn the valve clockwise until it stops. Do not overtighten the valve as this may damage it. Flush the toilet to empty the water tank after you've turned the water supply off.
Remove the valve cap cover. The valve cap is at the top of the valve mechanism and is near the top of the tank. Refer to the owner's manual for how to remove the cap, but you typically remove it by unscrewing it or popping it off with a small screwdriver.
Inspect the washer. Once the cap is off, look for any signs of damage or sediment near the rubber washer or rubber diaphragm. Use your screwdriver to tighten the washer if it is loose. If it is broken, you'll have to replace it or the entire valve system. Replace the cap, turn the water back on and fill the toilet. If the noise is gone, you don't have to replace the valve. If it isn't, you'll need a new valve.
Replace the Valve
Buy a new fill valve. If the valve is damaged, you can typically replace it yourself. Buy a new valve from your local hardware store and read the instructions thoroughly.
Empty the tank. Before installing the valve, turn off the water supply and flush the tank empty. Remove the remaining water with a sponge, wet-dry vacuum, or by letting it drain from the tank once the water line is removed -- just be sure to place a bucket under the hole in the tank where the line attaches.
Unscrew the water line. The water line attaches to the toilet at the bottom of the tank. Remove the line by unscrewing the nut holding it to the tank.
Remove the old valve by unscrewing it from the bottom of the tank with a pair of pliers. Lift the valve out of the toilet and set it aside.
Insert the new valve and reattach the water line. Insert the new valve into the same hole as the old one. Reattach it to the toilet tank by screwing the plastic washer under the tank and tightening with pliers or channel locks.
Test the new valve. Refill the tank, adjust the valve as the manufacturer's instructions recommend and test the new valve with a flush, to ensure the sound has stopped.
Newer ball cock assemblies come with fill valves whose float is connected to the shaft of the valve, rather than a ball extending from it. These assemblies make the shutoff easier, while wasting less water. The cost is also about the same as the more traditional systems -- about $10 to $20, as of 2011.
Call a plumber if you are not comfortable working on the toilet yourself.