This is due to carbon having four valence electrons, which are the electrons in its outermost shell that participate in bonding. Each single bond involves one electron from the carbon atom and one electron from another atom.
Let me know if you have any other questions!