The valve has a lower float and an upper float. As the valve box fills with water, the lower float will rise until it shuts off the flow of water. As the water drains, the top float covers a hole in the top of the chamber that the lower float sets in. Like placing a finger over a straw that is filled with water, the water is held by a vacuum in the chamber even as the water outside the chamber recedes. The lower float continues to be supported by the water in the chamber and continues to shut off the flow of water.
Once the water outside of the chamber reaches the level of the bottom of the chamber, the seal is broken and water rushes out of the chamber, the lower float lowers, and the flow of water proceeds. This cycle keeps repeating.