Working Principle of a Protective Scheme

How Does the Protective Relay Work ?