Gas chromatography is a technique used to separate and analyze volatile compounds. It works by injecting a sample into a column through which an inert gas flows, carrying the separated components out at different rates depending on their interactions with the stationary phase coating the column. The separated components are detected to produce a chromatogram showing peaks that can be analyzed to determine the identity and quantity of each component in the original sample.