but I haven't got idea to do the mounting.
If your optoisolator is in a [u]DIP package[/u] you can use a [u]plug-in breadboard[/u].
Do you know anything about optocoupler ?... I'm lost...
There's more than one kind of optocoupler/optoisolator, and there are solid state relays that are basically higher-power opto-isolators.
The "typical" optoisolator is an LED and a phototransistor inside the same package. Do you know how LEDs work? Do you know how phototransistors work, or how regular bipolar transistors work? On the input/LED side, you need a series resistor to limit the current into the LED. On the output/transistor side you normally need a pull-up resistor. The resistor pulls the output voltage high when the phototransistor is off. When the phototransistor turns on (when light hits it), the output gets pulled low.
That's just the general concept... You'll need to check the datasheet for details on any device you are considering.