ESEM operates by maintaining a pressure-controlled environment within the microscope chamber. This allows for the presence of water vapor, which prevents the dehydration of biological samples. The electron beam interacts with the sample and the surrounding gas molecules, and the emitted secondary electrons are detected to form an image. The ability to control the environmental conditions makes ESEM particularly suited for observing dynamic processes and living organisms.