An engine is a machine designed to convert one form of energy into mechanical work. Engines are usually combustion engines, which burn a fuel to create heat, which in turn is used to do work.
The first engines were steam engines, which were invented in the early 18th century. The first practical steam engine was built by Thomas Newcomen in 1712. James Watt improved on this design in the 1760s, and his improvements made steam engines much more efficient. Steam engines were used for many years to power factories and pumps.
The internal combustion engine was invented in the late 19th century. This type of engine burns fuel inside the engine itself, rather than using a separate boiler as with steam engines. Internal combustion engines are much more efficient than steam engines, and they are now used extensively in automobiles and other vehicles.