Carbon can form single, double and triple bonds with itself and with other elements of the periodic system.
Ethane The single bonds mark a three-dimensional tetrahedral structure: four electron densities ("balloons") around carbon.
Ethene The structure of a double bond is two-dimensional planar trigonal: three electron densities (one of them double) around each carbon.
Ethyne The atoms involved in a triple bond form a one-dimensional linear structure: two electron densities (two of them triple) around each carbon.
CH3CH3 ethane
CH2CH2 ethene
CHCH ethyne
Carbon can sustain simple bonds with nitrogen, oxygen, sulfur...
Methanol The single bonds mark a three-dimensional tetrahedral structure: four electron densities ("balloons") around carbon. Oxygen has four electron densities too (not explicited) and they are in tetrahedral arrangement. However, oxygen sustains two bonds that end up in angular disposition.
Methylamine The single bonds mark a three-dimensional tetrahedral structure: four electron densities ("balloons") around carbon. Nitrogen has four electron densities too (not explicited) and they are in tetrahedral arrangement. However, nitrogen sustains three bonds that end up in pyramidal disposition.
Metiltiol The single bonds mark a three-dimensional tetrahedral structure: four electron densities ("balloons") around carbon. Sulphur has four electron densities too (not explicited) and they are in tetrahedral arrangement. However, sulphur sustains two bonds that end up in angular disposition.
CH3OH methanol
CH3NH2 methylamine
CH3SH methylthiol
Acetone The four single bonds around the methyl carbons mark a three-dimensional tetrahedral structure: four electron densities ("balloons") around carbon. However, the carbonyl carbon only bears three electron densities (one double) and ends up as trigonal planar.
Pyridine All pyridine carbons and nitrogen bear three electronic densities (in N the unsahered electron pair is not explicited). Therefore, all carbons are trigonal planar. Nitrogen end up being angular.
Acetonitrile The four single bonds around the methyl carbon mark a three-dimensional tetrahedral structure. The atoms involved in a triple bond form a one-dimensional linear structure: two electron densities (one of them triple) around each carbon.
Carbon can form multiple bonds with nitrogen, oxygen, sulfur... Include them within a ring... Practically anything you can think of... But it is true that there are rules...