In ESI, the sample is ionized by applying a high voltage to a liquid containing the analyte as it exits a capillary tube, creating a spray of charged droplets. The solvent evaporates, leaving charged ions. These ions are then introduced into the TOF mass spectrometer, where they are separated based on their mass-to-charge ratio (m/z). The time it takes for ions to reach the detector is measured, and this data is used to determine their m/z values.