Oil and gas are hydrocarbons (molecules that have only hydrogen and carbon in them). Coal is mostly carbon. These fuels are called fossil fuels because they are dug up from underground. Coal mining digs up solid fuel; gas and oil wells bring up liquid fuel. Fossil fuel was not much used until the Middle Ages. Coal became the main kind of fuel with the Industrial Revolution.