When the steam engine was invented at the beginning of the 18th century, most sources of fuel worldwide were the same as they had been for centuries: wood for cooking, oil for lighting, coal for heating and industry. The advent of commercially successful steam power in 1712 allowed for machinery and engines that were larger and more capable than any machines had ever been, catalyzing the dramatic changes of the Industrial Revolution. During the 19th century, continuous improvements to steam engine design transformed factories and built railroads across Europe and the Americas. Both inventors and engineers knew, however, that steam power had significant limitations. Steam must be generated by burning fuel, usually coal: and steam engines were large and bulky to allow for a furnace. The first steam-powered locomotive, invented in 1804 by the English engineer Richard Trevethick, was so heavy it broke the rails it rode on. From the earliest days of the Industrial Revolution, engineers looked for alternatives to steam that would allow for lighter, more powerful engines.
Internal combustion provided one such alternative. For centuries, inventors had imagined and tinkered with internal combustion engines; the medieval Arab scholar Al-Jazari described twin-cylinder reciprocating pistons in 1206, and Leonardo da Vinci sketched compressionless engines in 1509. The modem combustion engine was the British inventor Robert Street's 1794 model, which used exploding gas to drive the pistons.
Finding reliable fuel in the 18th and 19th centuries was a problem. Inventors experimented with a variety of fuel including kerosene, wood, coal, natural gas, and crude petroleum. Petroleum-powered engines have since become the worldwide norm. Literally meaning 'rock oil," petroleum seeps out of porous rock. Until 1857, when the first commercial oil well was drilled in Ploiesti, Romania, nearly all petroleum came from oil-saturated sand deposits called oil sands or from surface-level oil seeps. Petroleum had been known to ancient people in Asia and the Middle East, though its use as an effective engine fuel awaited 19th-century advances in chemistry. Crude petroleum burns, but not very efficiently; it must be refined and distilled to become one of several usable fuel grades, e.g. kerosene, diesel, gasoline, or jet fuel.
The birth of internal combustion engines did not mean the immediate death of coal or steam power. During this period, coal remained cheap and plentiful and continued to be used to drive large steam engines. Factories and large industrial machinery continued to use coal as the main source of fuel, and coal remains the world's most-used fuel today. (The New York Times ‘Smarter by Sunday – 52 Weekends of Essential Knowledge for the Curious Mind’)