Graphite and diamond are different forms of carbon. Both are made only of carbon atoms, so burning either one in plenty of oxygen produces only carbon dioxide, which shows they contain nothing else. They have very different properties because the arrangement of their atoms is different.
Graphite and diamond are both examples of giant covalent substances. Each is made of a very large number of atoms joined together by covalent bonds, so they are not made of small separate molecules.
Because many strong covalent bonds have to be broken to melt them, both have very high melting points. Do not mix them up with simple molecular substances, which have weak forces between small molecules.