The voltage across RL is set by IF and CTR.
Vo = (IF * CTR)/ RL (Neglecting the small diff between Ic and Ie)
VCE = Vcc – (Vo + Vbe) (Across transistor)
Vo = Voltage across load R.
CTR = Current Transfer Ratio. (Ic/IF)
From looking at the pic you posted you should be able to see how isolation is provided. There is no physical connection (optical isolation) between input and output information is sent by photons. A transformer also provides isolation (galvanic). Isolation is used for safety (separate a HV input from a non lethal output) and device protection etc.
If your waveform is severely distorted you are switching to fast for your device. Check the data sheet for rise and fall times, storage, propagation etc