Intelligent Electronic Devices (IEDs), e.g., protective relays, have a vital role for protecting power systems and substations. In modern power systems, the performance of protection schemes by IEDs can be affected by cyber-physical, communication and cybersecurity operations and thus, a holistic modeling approach is required where all the domains are properly considered. However, commercial protective relays used in the field are mainly modeled using closed-source software. Therefore, this work proposes an integrated, realistic, and flexible model of an overcurrent protective relay compatible with IEC 61850 communication standard. This open-source model integrates the behavioural interactions between the protective relays and their physical, communication and cybersecurity operations in a digital substation. A model of transmission substation is developed in MATLAB/Simulink ® for validation purposes and the effect of communication operations and cybersecurity threats on the relay's physical operations is investigated according to different case studies and attack scenarios.