Is it safe to use Vcc from processor side or use another supply
Typically you would connect pin 3 to MCU ground, and pin 4 to one of the MCU logic inputs. In most MCUs, you can set a digital pin internally to "pull-up", so the input is pulled high by the internal pull-up resistor, and then when your opto-isolator is activated, it pulls DOWN against the MCU pull-up resistor.  

If your MCU doesn't have internal pull-up, then you can use an external resistor from pin 4 up to MCU VCC.