Measurement of natural variations in the abundances of stable isotopes of the same element is normally referred to as stable isotope analysis. This field is of interest because the differences in mass between different isotopes leads to isotope fractionation, causing measurable effects on the isotopic composition of samples, characteristic of their biological or physical history.
As a specific example, the hydrogen isotope deuterium (heavy hydrogen) is almost double the mass of the common hydrogen isotope. Water molecules containing the common hydrogen isotope (and the common oxygen isotope, mass 16) have a mass of 18. Water incorporating a deuterium atom has a mass of 19, over 5% heavier. The energy to vaporise the heavy water molecule is higher than that to vaporize the normal water so isotope fractionation occurs during the process of evaporation. Thus a sample of sea water will exhibit a quite detectable isotopic-ratio difference when compared to Antarctic snowfall.
Samples must be introduced to the mass spectrometer as pure gases, achieved through combustion, gas chromatographic feeds, or chemical trapping. By comparing the detected isotopic ratios to a measured standard, an accurate determination of the isotopic make up of the sample is obtained. For example, carbon isotope ratios are measured relative to the international standard for C. The C standard is produced from a fossil belemnite found in the Peedee Formation, which is a limestone formed in the Cretaceous period in South Carolina, U.S.A. The fossil is referred to as VPDB (Vienna Pee Dee Belemnite) and has C:C ratio of 0.0112372. Oxygen isotope ratios are measured relative the standard, V-SMOW (Vienna Standard Mean Ocean Water).
It is critical that the sample be processed before entering the mass spectrometer so that only a single chemical species enters at a given time.  Generally, samples are combusted or pyrolyzed and the desired gas species (usually hydrogen (H), nitrogen (N), carbon dioxide (CO), or sulfur dioxide (SO)) is purified by means of traps, filters, catalysts and/or chromatography.
The two most common types of IRMS instruments are continuous flow and dual inlet. In dual inlet IRMS, purified gas obtained from a sample is alternated rapidly with a standard gas (of known isotopic composition) by means of a system of valves, so that a number of comparison measurements are made of both gases.  In continuous flow IRMS, sample preparation occurs immediately before introduction to the IRMS, and the purified gas produced from the sample is measured just once.  The standard gas may be measured before and after the sample or after a series of sample measurements.  While continuous-flow IRMS instruments can achieve higher sample throughput and are more convenient to use than dual inlet instruments, the yielded data is of approximately 10-fold lower precision.