Octane rating measures a gasoline's resistance to engine knocking - premature fuel combustion. Higher octane fuels resist knocking better and are used in high-performance or high-compression engines. It does not measure density, boiling point, or purity.