MSI involves the use of a mass spectrometer to analyze samples in a spatially resolved manner. Typically, a sample is sectioned into thin slices and placed on a conductive surface. A laser or other ionization source is used to desorb and ionize molecules from specific points on the sample. These ions are then analyzed by the mass spectrometer, generating a spectrum for each point. By scanning across the sample, MSI creates a map of the molecular composition, revealing the spatial distribution of analytes.