PC817 is your standard optocoupler.
Use this IC to isolate two parts of a circuit.
Isolation prevents ground loops and prevents trasmission of unwanted noise.