Is your toilet filling really slow or there is water coming out from under the lid of your toilet? The issue is more than likely the toilet fill valve. Before making that decision, remove the water line from the toilet and run some water into a bucket to be sure that the line and shut off valve are clear.
The toilet fill valve can get clogged with sediment that is in your water system causing it to fill slowly. You can take it a part and turn the water on slow to try and flush the valve out.
Flushing out the valve will sometimes clear the issue, but most times you will cause the valve to leak once the seals are disturbed. If flushing the valve does not fix the issue you will need to replace the valve. This is a simple and inexpensive project.
The other reason you may need to replace the toilet fill valve is that it is leaking. The seals in the valve will need to be replaced as they will break down over time. It is faster and cheaper to replace the whole valve as apposed to trying to get and install new seals.
Check out the video below to how to change a toilet fill valve.