Receive Signal from different circuit
Unless there are exceptional circumstances you can just connect the two ground connections together. Then the 5V of your other circuit will be the same voltage as the 5V of the Arduino and you can just connect your signal direct to an input.

However, if there are exceptional circumstances (ground isn't really ground, for example) then you can use an opto-coupler to act like an optically-controlled button:







simulate this circuit &ndash; Schematic created using CircuitLab

R1 can be replaced by the internal pullup resistor of the Arduino by setting the pinMode to INPUT_PULLUP.

Note that this inverts the logic of the input: a HIGH input signal is detected on the Arduino as a LOW logic level, and vice versa.