A flush valve fails when its valve seat can no longer form a seal to hold water. As water leaks past a defective flapper or tank ball, it can cut channels through the valve seat. When these voids appear, you have two repair options: install a retrofit flush-valve seat right over the damaged seat, or separate the tank from the bowl and replace the flush valve. Retrofit kits are easier, but a new flush valve makes a longer-lasting repair.
To replace a flush valve, start by shutting off the water, either at the main valve or at the shutoff valve beneath the toilet, Lift the lid from the tank, and flush the toilet to drain as much water as possible. Sponge out any remaining water.
Remove the tank. With the tank empty, loosen the coupling nut that secures the water-supply tube to the fill-valve shank, and remove the tube. Reach under the tank, and using a socket wrench, remove the nuts from the two tank bolts. If the bolts spin, backhold them with a large screwdriver. In most cases, the nuts will turn free, but if your toilet is old and the nuts haven't been disturbed in many years, it's reasonable to expect them to resist. If the nuts seem really stuck, forgo the wrench and reach for a hacksaw blade. Brass bolts are relatively soft, and you should be able to cut through them quickly. Use the blade from a standard hacksaw,and wrap one end with duct tape to serve as makeshift handle. Use only the blade, because you can't fit a hacksaw between the tank and the bowl.