Diamond is one of the allotropes of carbon. Each carbon in diamond is bonded to four other carbons in a tetrahedral. This three-dimensional symmetry (all of the bonds are exactly the same length, strength and at the same angles) makes diamond extremely inflexible. So, if you put a piece of diamond against a piece of glass and drag one past the other, the glass' atoms will be forced out of place rather than the diamonds. This is how diamond scratches glass (or anything else for that matter). This means that diamond is the hardest naturally occurring substance (here, hard means difficult to scratch).
The structure of the diamond molecule can be seen here, built from a molecular model kit:
Each black ball in this structure represents a carbon atom, bonded to four others. In nature, the structure extends the full size of the molecule, with each diamond a separate molecule.