See my edited version of the schematic.
It works like this:
The diode side of the opto-isolator is supplied by +12v, the other end of the diode connects through a switch to an output port of a micro controller.
You will notice that each opto connects to several switches, the switches in turn connect to different output ports on the micro-controller.
The transistor side of the opto-isolator connects to an input on the micro-controller, when the opto is turned on the micro input is pulled low. From experience I expect that there are pull-ups are fitted on the micro board.
To read the state of the switches, the micro sets the outputs low, one at a time and reads the input port, so multiplexing the inputs in a similar manner to a keypad multiplexer.
JimB