The GC works by injecting a sample into a flowing inert gas, typically helium or nitrogen, which acts as the mobile phase. The sample travels through a column coated with a stationary phase. Different compounds in the sample interact with the stationary phase to varying degrees, causing them to separate as they travel through the column. The separated compounds are then detected, usually by a flame ionization detector (FID) or a mass spectrometer (MS), and their quantities are recorded.