Transponders transpond to surveillance radar. So when an aircraft is in a radar beam, the aircraft transponds or reports back to ATC according to the selected modes and codes. It works only if there is ATC radar in the area and the aircraft is high enough to be seen by the radar. It also depends upon ATC to take action in terms of traffic safety.