Carbon forms covalent bonds; the most usual kind of bond formed by carbon is a covalent bond. In the majority of situations, carbon shares electrons with other atoms because of the presence of four valence electrons.
As carbon has four valence electrons in its outermost shell, and as each covalent bond needs a donation of one electron to form the bond, carbon tends to make exactly the four bonds and is only stable if all four of these bonds are utilized.