Carbon atoms have four electrons in their outer shell. This means that a single carbon atom can form up to how many bonds with other atoms?
The octet rule states that atoms can fill their outer shells with up to 8 electrons (a full shell of 8 is the most stable configuration).
Since Carbon only has 4 of its outer electron slots (or valence electrons) full, it has room to make bonds with 4 other atoms, assuming they are all single bonds. This will fill Carbon's valence shell and give it all 8 electrons it needs to be stable.
One example of this is methane (
There are a few exceptions to the octet rule (Hydrogen, Helium, Boron, and some transition metals), but Carbon is not one of them, and so it follows the octet rule normally.