A petroleum refinery takes crude oil and refines it into useful products like gasoline, diesel fuel, and jet fuel; the refining process involves separating the components and removing impurities and contaminants from the crude oil through different chemical processes and fractionation.