In words, the equation for combustion, in most cases, is a hydrocarbon plus oxygen equals carbon dioxide plus water plus heat. Other cases involve burning hydrogen and oxygen without carbon and reactions that create carbon monoxide.
Combustion occurs because hydrocarbons and oxygen contain more energy than carbon dioxide and water. The application of activation energy, such as heat, to the hydrocarbons in an oxygen environment causes the hydrogen and carbon to bond with the oxygen, putting the atoms into molecules with a lower energy state. The excess energy is given off as heat.
Incomplete combustion frequently involves the creation of carbon monoxide, which occurs when there is not enough oxygen to fully combust the hydrocarbon. Methane and solid carbon may also be released in a low-oxygen environment.
Combustion does not necessarily mean fire. In an internal combustion engine, for example, the burning of fuel and the expansion of hot gases is used to propel a motor. It also does not necessarily mean the use of carbon; in a rocket engine, liquid hydrogen and oxygen are combusted to produce as much reaction energy with as little weight as possible. Cars with hydrogen fuel cells use the same form of carbonless combustion.