RCDs detect when electricity is leaking to earth — for example, through a person who accidentally touches a live wire. By switching off the power almost instantly, it can prevent serious injury or even death.