To replace a ballcock, one has to make sure the water shut off valve for the toilet is in the Off position. The locknut under the tank is then unscrewed to remove the old ballcock. The new ballcock assembly is inserted into the hole in the tank and with the inside washer in place, the locknut is tightened on the outside sufficiently to make the inside washer fit water tight against the hole.
1 Additional Answer
Purchase a replacement ballcock assembly for your toilet at a hardware store. Turn the water shutoff valve to the off position before working on the toilet and remove the valve plunger. Inspect the washers for defects and replace them accordingly. Flush the toilet to get all of the water out. Use a screw driver to unscrew the float arm from the ballcock assembly. Remove the refill tube from the overflow tube. Unscrew the nut under the tank and remove the ballcock assembly. Place the new ballcock assembly in the hole in the tank. Tighten the nut on the outside, keeping the washers in place. Check for leaks at all connections after turning the water back on to the toilet. Make sure the float does not rub anywhere when flushing.