In principle when the door bell is pressed, the apartment own door bell light will be activated. 

Then the transmitter will detect it through the photocell sensor and transmit a basic data to the receiver.

If the transmitter will receive the data correctly it will turn the relay on and the light and/or the buzzer will turn on.