Voltage sensor. Isolated

Thanks but I'm bit lost with your diagram I will try to understand this better on the conputer.
But how does a relay and a capacitor isolate grounds ?

Rhanks