A single carbon atom can form a maximum of four covalent bonds. The number of covalent bonds that an atom can form is limited by its number of valence electrons. Carbon has four valence electrons, and it can use each of these four electrons for bonding.
The formation of four covalent bonds does not necessarily mean that carbon must bond with four atoms. It can form two double bonds, as in CO2; it could form a triple bond and a single bond, as in C2H2; or it could form a double bond and two single bonds, as in CH2O (formaldehyde).