From what I've read thus far, electronic shutter is a type of device that controls whether the image sensor is turned off or on non-mechanically, my question is, like the title implies, what exactly control it and how it turns the sensor off or on (if charge is accumulated when the sensor exposed to light by a CCD/CMOS) ?

I also have another question regarding this shutter.
If it's relatively fast, how come it's flash sync. is slower than a mechanical shutter?