Hydrocarbon refers to a molecule whose structure includes only Hydrogen and Carbon. interestingly though hydrocarbons (Once Combined) also from bonds with other atoms i order to create organic compounds. The presence of carbon is required for a compound to be classified as in all but a few cases but the presence of hydrocarbon adds even more basis for it to be considered organic as there are few inorganic compounds that do certain carbon but not hydrogen. The presence of a hydrocarbon in an organic compound means the bond between the atoms will be particularly strong,unlike the bond in inorganic compounds and organic compounds that contain a carbon Atom, the presence of other atoms leads to hydrocarbons being classified as either pure (Only Hydrogen and Carbon) or impure (Hydrogen or carbon bound to the other atoms as well as each other).
some examples of Hydrocarbon is Methane (CH4), ethene (C2H4), ethane (C2H6), ethylene (C2H2) etc.