Covalent compounds are formed when

a metal bonds with a metal
a nonmetal bonds with a nonmetal
a metal bonds with a nonmetal
a metal bonds with a noble gas