A protective relay is a device that detects faults in electrical systems and operates circuit breakers to isolate faulty sections. It distinguishes normal and abnormal conditions by measuring electrical quantities like voltage, current, and frequency that change during faults. The relay components include inputs that receive measurements, settings to program decision thresholds, processing to compare inputs to settings, and outputs to operate switches. Relays ensure the safety of equipment and continuity of supply by rapidly detecting faults and automatically disconnecting the faulty section from the healthy system.