A hydrocarbon is any variety of organic compound consisting entirely of carbon and hydrogen. Owing to the inherent molecular flexibilities of carbon and hydrogen, hydrocarbons assume a vast variety of structures.
Saturated hydrocarbons (alkanes) are the simplest hydrocarbon species, composed entirely of single bonds. Petroleum fuels are derived from alkanes. Alkanes with 1 or more rings of carbon atoms are cycloalkanes.
Unsaturated hydrocarbons have 1 or more double or triple bonds between carbon atoms. Alkenes are double-bonded hydrocarbons. Hydrocarbons with triple bonds are alkynes.
Hydrocarbons come in a variety of phases at room temperature: gaseous (e.g. methane (CH4)), liquid (e.g. hexane (C6H14) and octane (C8H18)), wax or low-melting solid (e.g. paraffin (CnH2n+2, from C20H42 to C40H82)), and polymers (e.g. the ubiquitous plastic polyethylene (always following the formula: (C2H4)nH2), which is so durable as to resist biodegradation).
The more complex the hydrocarbon, the more stable.
Hydrocarbons are hydrophobic, as are lipids.