REF relay stands for Restricted Earth Fault Protection. It is an earth fault protection, and it will cover the protection for a particular area or zone. Generally, it is used to detect internal earth fault of a Power Transformer or Reactor. As the earth fault protection is cover for a particular area. It is called restricted earth fault protection.
Diagram of Restricted earth fault protection is shown above. It will protect the area between the phase CT and neutral CT of the Transformer. During normal condition, there will be no current flow through the REF relay. Further if any fault triggered outside the above CT, the same fault current will flow through the neutral CT in opposite direction and the resultant current through the REF relay is zero and the REF protection will not operate.
If any fault triggered between the phase and neutral CT, the resultant current would flow to through the REF relay and it will operate based on the settings value.