In IMS, ions are generated through ionization methods such as electrospray ionization or matrix-assisted laser desorption/ionization. These ions are then introduced into a drift tube filled with a neutral gas. An electric field is applied, causing the ions to drift towards a detector. The time it takes for an ion to travel through the drift tube (drift time) is measured, which is influenced by its collision cross-section with the gas molecules.