Distillation works by heating a mixture of organic compounds to a temperature where one component will vaporize. The vapor is then condensed and collected, resulting in a purified product.