Atoms form bonds to achieve stable electron configurations. Covalent bonds form when atoms share valence electrons to fill their outer shells. Different bonding structures lead to varied properties. Diamond has a giant covalent structure where each carbon atom bonds to four others in a 3D network, giving it properties like hardness. Graphite also contains carbon but its layers can slide due to weaker bonds between layers, making it soft.