Answer: By sharing its electrons and forming covalent bond.
Step-by-step explanation:
Carbon is the 6th element of the periodic table having electronic configuration of

This element requires 4 electrons to have a stable electronic configuration.
Carbon cannot gain 4 electrons because it will be difficult for a nucleus of six protons to hold extra 4 electrons.
This element also cannot loose 4 electrons because it requires very large amount of energy to remove 4 electrons.
Covalent bond is formed by the sharing of electrons between the atoms forming a bond.
Hence, carbon will only share its electrons and will form covalent bond with other atoms.