By automatic disconnection of supply
This principle consist in connected to the earth all metallic part of equipment and appliances. The disconnection can be done by MCB or RCCD depending on the earthing system. Devices will control and measure the current going through the earth. The disconnection should be fastest as possible.