Sodium Chloride is an ionic compound which, when formed, exists as a 3D giant "cube based" ionic lattice with 6-6 coordination. In this lattice, each sodium ion (positive ion) is surrounded by 6 chlorine ions (negative ions) to which it is ionically bonded. The sodium ion is attracted to the chlorine ion by electrostatic forces (caused by opposing charges).
In contrast, Diamond is a covalently bonded form of Carbon in the form of a 3D giant tetrahedral covalent structure. Each carbon atom is covalently bonded to 4 other carbon atoms and there are no charges or ions. The covalent bonds are formed by the donation of an electron from each atom to form a pair of electrons. These electrons are attracted to the positive nuclei of both bonding atoms, holding them together.
So in conclusion:
Sodium Chloride is: an IONIC LATTICE, based around a series of CUBES, with 2 DIFFERENT ELEMENTS- Sodium and Chlorine. Each ion is bonded to 6 others.
Diamond is: a COVALENT LATTICE, based around a TETRAHEDRAL STRUCTURE, with only 1 ELEMENT involved (Carbon). Each atom is bonded to 4 others.