As previously mentioned, because carbon has four valence electrons and makes covalent bonds, it can form molecules that are long chains. Because of the many important and unique properties of carbon-based molecules, there is a special branch of chemistry devoted just to the study of these molecules.
Organic chemistry is the study of compounds containing carbon.
There are many different kinds of hydrocarbons based on different numbers of carbon atoms in the molecules and whether or not any of the carbons are connected by double bonds rather than single bonds. Since carbon has four valence electons, it can make four single bonds with other atoms by sharing one of its electons and one of the other atoms' electons with each of those atoms. This would mean that this carbon atom would, then, have only two other electrons available for bonding with any other atoms. For example, if a carbon is single bonded to another carbon, it could also be bonded to three hydrogens, but if a carbon is double bonded to another carbon, then it can only bond to two hydrogens. Generally, hydrocarbons are not found in living organisms, but are found in quantity in fossil fuels, which used to be living organisms.