An optocoupler is no more than a LED and phototransistor in a dark box. When the LED is lit, the phototransistor fires up. The reason they are used is the two circuits are not electrically connected, where they are in standard transistors, protecting it from power surges. I would have thought a transistor would have been easier and i would have figured only to use an optocoupler only for special applications where its protection is needed, but hey, i guess it works.