👉 In physics, a hydrocarbon is a chemical compound consisting of carbon and hydrogen atoms. These compounds are often used in various industrial processes such as refining crude oil into petroleum products or producing synthetic fuels like gasoline and diesel fuel from natural gas.