The fill valve is the mechanism inside the water tank of the toilet that refills it to the right height after the toilet is flushed. Replacement fill valves can be bought at any hardware store, and any fill valve will do in terms of which one to buy, they are usually adjustable. Here are the steps to removing your old fill valve and installing a new one.
Step 1: Remove the Lid to the Water Tank
The fill valve is in the water tank, so your first step will be to remove the lid on top of your toilet's tank. Be careful, as it might be heavy, and water may have condensed onto the roof of the lid.
Step 2: Shut the Water Off
Now, you need to shut off the water supply line that feeds water into the tank. You can do this by turning the shutoff valve at the end of the line clockwise. After you shut the water off, you should flush the toilet and hold the handle down to drain as much water out of the tank as possible.
Step 3: Unscrew the Supply Line From the Tank
After the water has been shut off, you can unscrew the water supply line from the bottom of the fill valve. I recommend placing a bucket or some sort of container underneath the area where you are working, as some water will come out of the supply line when you un-screw it.
Step 4: Unscrew the Nut That Holds the Fill Valve in Place
After the water supply line has been dis-connected, you can un-screw the white plastic nut that hold the fill valve in place. You might be able to just do it by hand, but if you find it to be too difficult, I recommend using an adjustable crescent wrench, a channellock, or a pipe wrench. If you do need to use a tool, be careful not to strip the nut, make sure to find a tool that can grip it appropriately.
(it is usually a nut or a flange that is holding the fill valve on, but it can be different for each fill valve)
Step 5: Remove the Old Fill Valve From the Tank
After you unscrew the nut/flange that was holding the fill valve in place from outside of the toilet, you should be able to unhook the refill tube from the overflow tube, and pull the old fill valve out of the tank. Make sure you have a container underneath the hole that the fill valve was in, because when you pull the fill valve out any water remaining inside the tank will flow out of the hole. The old fill valve will probably still be wet, so you can drop that in the container that you have underneath.
Step 6: Put the New Fill Valve in the Tank
After the old fill valve is out, you can grab your new fill valve and place it inside the tank where the old fill valve used to be.
Step 7: Screw the New Nut/flange That Came With the New Fill Valve Into Place Underneath the Tank
When you buy a new fill valve, it should come with a new nut to use underneath the tank to hold it in place. Put that nut over the end of the fill valve underneath the tank just like the old fill valve, and screw it into place. You don't need to screw it in too tight, and if you are using a tool be careful how tight you screw it in. If the new fill valve didn't come with a new nut, the one from the old fill valve will work.
Step 8: Reconnect the Water Supply Line, and Turn on the Water
After the new fill valve is in place, you can hook the new refill tube onto the overflow tube. (the refill tube is the small tube that is attached to the fill valve, and the overflow tube is the tube sticking up in the middle of the tank.
After you turn the water back on, water should start to flow into the tank, and the tank should begin to fill up. The fill valve controls at what level the tank stops filling up, and the height at which the tank stops filling up is adjustable. Right after you install the new fill valve, you may have to adjust it and go by trial and error until you get the water to stop at the desired place.
You should set it so that the water stops a 1/2 - 1 inch away from the top of the overflow tube.