What do you think what is optocoupler?
Our electronic definitions web site has answer for that as well:
a combination of a LED and a photodiode. An input signal to the LED is converted to varying light which is detected by the photodiode. The advantage is very high isolation resistance between the input and output.