How is the toilet tank itself refilled?
By the valve operated by the float.

As the water rises in the tank the float floats and at a certain height that closes the valve which stops filling the tank as it is ready for the next flush.