A ballcock is a fill valve that controls the flow of water from the water supply line into a gravity-operated toilet tank. It is controlled by a float mechanism that floats in the tank water. When the toilet is flushed, the float drops and opens the ballcock, releasing water into the tank and/or bowl. As the water in the tank is restored, the float rises and shuts off the ballcock when the tank is full.