The water flow switch is a mechanical/electrical assembly.
As it only detects the water flowing in the pipes, the water flow switch does not turn on or off the water. It just sets off the alarms by activating electrical switches.
To detect the water’s movement, the assembly has a paddle across the inside of the pipe. When water starts moving in the pipe, it pushes on the paddle. The paddle is on a lever that, when the water has pushed aside the paddle, allows a pair of switches to activate, after a time delay.