Crude oil is a finite resource found in rocks. It is the remains of ancient biomass, mainly plankton, that was buried in mud. Finite means it will run out, because it forms far more slowly than we use it. Crude oil is a mixture of a very large number of compounds, and most of them are hydrocarbons.
A hydrocarbon is a molecule made up of hydrogen and carbon atoms only. Most of the hydrocarbons in crude oil are alkanes. Alkanes form a homologous series, which means they are a family of similar compounds with the same general formula, CnH2n+2. For an alkane with n carbon atoms, the number of hydrogen atoms is twice n, plus 2. The first four members are methane (CH4), ethane (C2H6), propane (C3H8) and butane (C4H10). You only need to know these four names.
You may be asked to recognise an alkane from its formula. Check two things. It must contain only carbon and hydrogen, so C2H6O is not a hydrocarbon. It must also fit the general formula: with 3 carbon atoms an alkane has 8 hydrogen atoms, so C3H8 is an alkane but C3H6 is not. Alkanes can be shown as a molecular formula or as a displayed formula, where every bond between the atoms is a single bond.