A sump pump is triggered to run when water in the pit rises, and the float switch reaches a certain height. This will initiate the pumping sequence, and the pump will pump water until the water level has dropped again, preventing a flooded basement.