If you form a compound made of only carbon and hydrogen, then you have effectively made a hydrocarbon. Hydrocarbons are really at the heart of organic chemistry - they definitely are when thinking about nomenclature of organic compounds. The alkanes happen to be the most basic of all hydrocarbons. They are made up of only C–C single bonds and C–H single bonds.
Alkanes are known as saturated hydrocarbons in that all the bonds are single bonds. This also means that the basic generic formula for all alkanes is CnH2n+2. Each carbon will have 4 single bonds and each hydrogen will have one single bond. The figure below shows the local structure for all C's and H's in an alkane.
Now lets build a series of alkanes with a simple rule: all the carbons in the structure must be in a line with no branch points. This means that all the carbons are bonded to only two other carbons and the carbons on the ends will only be attached to one carbon. These are known as straight-chain alkanes or normal alkanes. Realize that the word "straight" really means in a continuous line and not really straight like a meter stick or yardage lines on a football field. Just think of links in an actual chain and how the chain can be arranged in various shapes depending on how long it is. Below are three structures for n-pentane (n is the abbreviation for "normal"). Each structure has 5 carbons in line with each other. What is important is the 5-carbon chain in each (shown in green) is continuous with no branching.
The longer generic formula for this type of n-alkane is CH3–(CH2)n–CH3. The ends (CH3–) are called methyl groups and the links (CH2) are called methylene groups. This is the base name for which all organic compounds are named.
There can literally be hundreds of ways to write different structures for the same formula alkane once there are many carbons. There are only 2 possible different structures for butane, C4H10. Hexane, C6H14 has 5 different structures. Nonane, C9H20, has 35 different structures. And dodecane, C12H26, has 355 different structures. Different structures with the same empirical formulas are called isomers. There are different types of isomers - for now, we are only thinking about structural isomers (aka constitutional isomers). The same set of atoms in a formula are arranged differently in space. Structural isomers are the easiest to recognize. See below the structures for C2H6O which can be dimethly ether or ethanol.
Learn the n-alkanes first. All those isomers will have uniquely different names - not to mention, different physical and chemical properties as well. For now, just learn the straight-chain alkanes. Below is a table of the names and formulas of common alkanes. You should memorize and know the first table of the first 10 alkanes. The other table is just there for reference purposes to let you see the systematic nature of the naming.
A simple alkene is simply an alkane that has a carbon-carbon double bond (C=C) in any one of the carbon chain positions. In order to accommodate for this you have to remove two hydrogens (you eliminate them to use organic reaction lingo). This means that all simple alkenes have the generic formula of CnH2n. Notice there is no "+2" on the H's. Naming wise, you just replace the "-ane" suffix of the alkane with a "-ene" suffix for the analogous alkene. Propane becomes propene, pentane becomes pentene, etc. You get the idea.
Now to just finish off the other simple type of hydrocarbon, lets make a simple alkyne now. An alkyne is an alkane that has a carbon-carbon triple bond (CC) in any one of the carbon chain positions. In order to accommodate for this you have to remove four hydrogens (once again, you eliminate them). This means that all simple alkynes have the generic formula of CnH2n-2. Notice that is a "–2" on the H's. Naming wise, you just replace the "-ane" suffix of the alkane with a "-yne" suffix for the analogous alkene. Propane becomes propyne, pentane becomes pentyne, etc.