The toilet overflow pipe sits to the right side of the toilet refill valve. It has a flapper that goes up to release the water in the tank and down to prevent water from leaving. The valve fills the tank up to a certain point, but if there is a problem with the valve, it will inject excess water into the overflow pipe which injects the extra water into the toilet bowl. This could cause the toilet to overflow and multiple problems could occur. An annual check should be done on the toilet functions to make sure everything is running properly and nothing is rusted or cracked. Replacing the overflow pipe should take 30 minutes at most.
Turn off the water. Turn the valve that is below the tank and behind the toilet counterclockwise. Flush the toilet, and make sure to remove all of the water from the tank. Remove the lid to the tank, and wipe it out with a dry sponge to make sure all of the water is gone.
Look underneath the toilet tank. There is a main bolt that is attached and will need to be removed from the tank. Use pliers to turn the bolt counterclockwise and remove it. You will see a washer and another bolt that will also need to be removed. If these tend to be difficult to move, then put some penetrating oil on them and let them sit for several minutes before trying again.
Disconnect the chain connected from the flapper. Remove the refill tube from the overflow pipe by simply lifting it out of the pipe. Turn the overflow pipe counterclockwise halfway to remove it.
Purchase a new overflow pipe and new flapper. Put the new pipe and flapper into the tank. Fit the pipe into the fitting. Fit the pipe into its hole that it sits in by pressing it in. The flapper will need to be slipped over and down the pipe until it sits over the hole in the tank.
Replace the bolts and washer on the bottom of the tank. Turn the water back on. Turn the valve clockwise that you used to turn off the water. You should hear the tank fill up with water. Check to be sure that the tank is filling up, then replace the lid over the tank.
Be as gentle as possible when removing the bolts on the bottom of the tank. You could crack the tank if you use too much force.