Optoisolators are circuits designed to isolate one circuit from another using light. Why would you use light instead of implementing some diodes or voltage regulators? Because light is essentially a guaranteed protection. If an overvoltage or overcurrent is applied to the optoisolator, the optoisolator circuit is destroyed and the circuit(s) it was protecting will not be affected.
The most common optoisolators are placed in an integrated circuit for convenience and efficiency. The most popular model is the 4N33, which is housed in an 8-pin DIP package. The 4N33 internally is basically an LED next to a phototransistor. This could be called an optical modem, since it modulates the electric signal into light waves, which are demodulated by the phototransistor as it converts the light into electricity again.
To design a circuit using an optoisolator, you cannot ignore the components inside of it. On the input circuit, you must take the forward voltage of the LED into account, which can be approximated to .7 volts. On the output side, you should take the phototransistor's forward voltage into account and it can be approximated to .2 volts. If you are working with relatively high voltages, you will need a resistor on the input to protect the LED.
Optoisolators are commonly used to protect expensive circuits from voltage and current surges. One example application would be on the output of a microprocessor. Most microprocessors can't output a very high current, but you might want to be able to power a motor with an output pin. To work around this problem, you could connect the output pin to the optoisolator's input and then connect the motor in series with the output and a voltage supply that is high enough to power the motor. This way, the majority of the current is coming from the independent power supply rather than the microprocessor.