A refinery is an industrial complex that manufactures petroleum products, such as gasoline, from crude oil and other feedstocks. Many different types of refineries exist across the country. What differentiates one refinery from another are their capacities and the types of processing units used to produce these petroleum products.

Refineries have a distillation column and then can have any combination of secondary processing units depending on the type of crude oil they process and the products they want to produce. The simplest refineries have a distillation column and nothing else. These refineries are often referred to as topping refineries.

A distillation column separates crude oil into different petroleum products based on differences in boiling points. By itself the crude distillation column has low yields of high-value transportation fuel products. Many of the other unit operations involve chemical processes that create products by either reshaping hydrocarbons, combining small hydrocarbons into larger hydrocarbons, cracking larger hydrocarbons into smaller higher-value hydrocarbons, or removing impurities such as sulfur. Each secondary processing unit after the distillation column has a specific purpose, whether it is increasing separation; upgrading low-value products, like residual fuel oil, to high value products, like distillate; increasing octane; or enhancing environmental compliance by removing sulfur and other pollutants.

A refinery's level of complexity is often based on how much secondary conversion capacity it has. The Nelson Complexity Index is one measure of refinery complexity. This index was developed in the 1960s by W.L. Nelson in a series of articles for the Oil & Gas Journal. The index measures the complexity and cost of each major type of refinery equipment. In forming the index, the distillation column is given a value of 1 and the other units are assigned a value based on conversion and cost relative to the distillation column. The larger the Nelson index of a refinery, the more complex it is.

As an example, Phillips 66 reports that its U.S. refineries range in Nelson complexity from 7.0 at its Ferndale refinery in Washington because it has a fluid catalytic cracker, alkylation, and hydrotreating units, to 14.1 at its Los Angeles refinery in California because it has a fluid catalytic cracker, alkylation, hydrocracking, reforming, and coking units. In addition to those two West Coast examples, the U.S. Gulf Coast has some of the world's most sophisticated refineries.