In organic chemistry, a hydrocarbon is an organic compound consisting entirely of hydrogen and carbon. Hydrocarbons are examples of group 14 hydrides. Hydrocarbons, from which, one hydrogen atom has been removed are functional groups called hydrocarbyls. Because carbon has 4 electrons in its outermost shell (and because each covalent bond requires a donation of 1 electron, per atom, to the bond) carbon has exactly four bonds to make, and is only stable if all 4 of these bonds are used.
Aromatic hydrocarbons (arenes), alkanes, cycloalkanes and alkyne-based compounds are different types of hydrocarbons.
Most hydrocarbons found on Earth naturally occur in crude oil, where decomposed organic matter provides an abundance of carbon and hydrogen which, when bonded, can catenate to form seemingly limitless chains.