the simplest type is known as a circuit breaker. more info needed to give a morr specific answer. sensing current flow and operating a relay would be another.
i know there is already a device for that...
im asking if how does it cut it off?
and im not talking about analog type...'
im thinking about the digital version...
a timer cuts off power with a switch. some are mechanical and just open a set of contacts. others use a control voltage to operate a solid state relay.