Why is carbon able to bond with atoms of other elements in many different ways?

Because carbon is in the group 4A. This means it has four valence electrons. This means that it can either become an anion or a cation. This allows carbon to bond with many elements in many different ways.