If your toilet is constantly running or taking a long time to refill after a flush, it might be time to go ahead and replace the valve.
The most important step in replacing a toilet fill valve is remembering to shut the water off using the shutoff valve directly behind the toilet tank. To minimize leakage it is also a good idea to flush the toilet after the water is off. This will drain the water out of the tank, allowing you to safely remove the valve assembly.

Looking inside the tank, you will find the fill tube. This is the long tube that makes up the bulk of the interior assembly, and it will have the float ball attached to it near the top. Underneath the tank there will be a nut securing this tube. Loosen that all the way, and the tube should easily lift out. It may also be necessary to disconnect another tube that leads to an overflow valve, but it depends on the toilet type.