If you have an older toilet, chances are that the supply tube is outdated, and it may also be blocked with corrosion or otherwise restricting water flow. New supply hoses are inexpensive and easy to install, but removing the old one may not be as easy if it's stuck with corrosion. Before you remove it, make sure you have a replacement that fits both the toilet and the water supply shut-off valve.
Measure for the New Hose
To avoid keeping your toilet out of service, it's a good idea to have the new hose ready before you remove the old one. If you're the type who forgets to make measurements before you go to the hardware store, you aren't alone, but it's easy to avoid doing this. You need only two measurements: the distance from the toilet outlet to the valve and the size of the valve connector, which is either 3/8 or 1/2 inches. The toilet connector is a standard 7/8 inches in diameter. Get a hose long enough to easily span the distance without coiling over on itself.
Empty the Tank
Before you remove the old hose, you need to shut off the water valve by turning the handle clockwise as far as it will go, but that's not all you should do. Any water in the tank will pour onto the floor, so flush the tank, then hold down the handle until as much water has emptied into the bowl as possible. That still leaves an inch or two of water in the bottom of the tank -- transfer this into the bowl with a sponge. Even after completely emptying the tank, a small amount of water will spill when you unscrew the hose from the toilet, so put a rag on the floor to catch it.
Unscrew the Old Hose
You can usually turn the plastic toilet connector on modern toilet supply hoses by hand, but that isn't always true, and it definitely isn't true if the connector is brass. Turn to adjustable pliers when your fingers won't work. The connector that attaches to the shut-off valve is always brass, and you always need pliers or a wrench to turn it. If either connector is stuck, liberal amounts of spray lubricant may loosen it. You'll need two pairs of pliers for stuck connectors; hold the toilet fill valve or shut-off valve steady with one pair while you turn the connector nut with the other.
Screw on a New Hose
It's best to screw the new hose to the valve first, then attach it to the toilet. Remove the old plumbing tape from the valve threads and wrap new tape around them, then screw on the connector and tighten it with pliers. Don't over-tighten the valve connector -- you can always give it some extra torque if it sprays when you turn on the water. You don't need pliers or tape to connect the other end of the hose to the toilet; just tighten the plastic toilet connector as much as you can with your fingers. When you're done, turn on the water, let the tank fill completely and look for drips. Tighten the connector a bit more if you see any.