My girlfriends toilet valve started leaking water into the tank causing it to constantly run. In this case it was not a problem with the float, the "valve inside the valve" was beginning to spray water when closed. Replacing the valve is easy and takes less than 30 minutes.
Before you replace your valve make sure a simple float adjustment will not fix your problem. That is outside the scope of this guide though, I'm here to tell you how to replace the darn thing!
Start by getting a replacement toilet valve kit from the hardware store. Get a decent one that gives you a new flapper too. If you are going to do this much work on the toilet, go ahead and replace the other rubber components in the tank which a full kit will include.
You will also need a set of adjustable pliers.
Step 1: Have a Seat Over There
First, have a seat on the bowl facing the toilet. Get comfy, there's no need to be afraid of it. This will be your world for the next 10-20 minutes.
Step 2: Empty the Tank
Remove the top of the tank and set it aside.
Turn off the water valve to the toilet and then flush it. That will empty most of the water. Go ahead and remove the flapper and set it aside. Don't worry about the grime in the tank, it can't hurt you. The water in the tank is on the "clean" side of the toilet, no waste gets in here. The scum and buildup is the stuff that you drink in your tap water every day. Yep. You drink that every day and it doesn't hurt you, thats just mineral buildup and some rust from the tank bolts.
There will be a small amount left in the bottom of the tank, you will need to get this out too. I opened the package the new valve came in and cut a small plastic protrusion out of the blister pack. I used this to bail most of the water down the center hole. Then use a papertowel to dab up the remaining water and squeeze it out down the center hole.
Step 3: Remove the Old Valve
You will want an old towel or a roll of paper towels near by. Remember, the nuts are upside down so they adjust lefty-tightly and righty-loosey unless you look at them upside down, then it's normal (lefty-loosey righty-tighty).
First, unscrew the water line to the old valve. This will be the lower coupler under the toilet. Once that is undone, the water line can be safely pulled away (you did turn the water off first right?). A small amount of water that was left in the water line may drain out if the open end drops too low.
Next, unscrew the upper nylon nut that is closest to the tank. If there is any water left in tank it will drain out as you loosen this one. Once the nut is removed, the old valve can be lifted up out of the tank.
Step 4: Install the New Valve
If the new valve has a nylon nut on the bottom, remove it. Make sure the rubber gasket remains on the valve stem. Drop the new valve into the tank and insert it into the hole the old valve was sitting in.
Thread the nylon nut onto the valve stem protruding out the under-side of the tank. Make sure to check out the directions to see how to adjust the water level of this new valve (you know, that piece of paper you threw away as soon as the package was opened ;-). Some have to twist and you may need side-to-side clearance for the head of the valve before it's tight.
Make sure the new valve is good and tight, use a set of pliers to tighten it. Now reconnect the water line. Get this good and tight too. But you also have to be careful to not strip the nylon nut (both the one on the water valve and the water line).
Step 5: Install the New Flapper and Bowl Fill Hose
Install the new flapper if your kit came with one, otherwise reinstall the old one. On a new flapper you will need to adjust the flush chain so the flapper is fully lifted when the flush handle is fully depressed. Just move the chain clip down a few links of the chain and then clip onto the handle lever. In the last photo you can see how many links I took out for my install.
Now, see that rubber hose that ran from the old valve to the center tube? It needs to go down the center tube, it should not drain into the tank. That is the line that fills the bowl back up while the tank refils. Hopefully your new valve kit came with a new one, go ahead and replace the old rubber tube with the one. There should be an obvious place for the tube to connect on the valve.
Step 6: Turn the Water Back On
First, with the water still off, dry the under side of the tank and the water line to the wall. If it leaks, you want to know for sure that the water is new and not left-over water.
Turn the water valve on. Don't be alarmed, your tank will start filling immediately. Use your hand to feel for water leaking out under the tank down the water line. If it's a large amount of water, just turn it back off and redo your connections. If it's just a small amount of water leaking, use your adjustable wrench to tighten both the valve nut and the water line nut. With some encouragement the nylon nuts should start doing their jobs and water stops leaking. Remember, the nuts are upside down so they adjust lefty-tightly and righty-loosey unless you look at them upside down, then it's normal.
Once you are sure you're not leaking water and everything looks right, go ahead and stand up and lift the toilet lid. Give it a flush and make sure everything is working as it was before. If something is out of whack, go back and re-read these directions. Or heck, even try reading the directions that came with the new valve ;-).
Put the tank lid back on, mop up the water that dripped onto the floor around the bowl, and now you are done!