Diamond and graphite show different properties because of difference in their structure.
Diamond
Graphite (blue dots represent carbon atoms)
If you look closely, you will find that every carbon atom in diamond is bonded to 4 other carbon atoms via 4 valence electrons of carbon. Whereas in graphite every carbon atom is bonded to only 3 other carbon atoms via 3 valence electrons, leaving 1 free electron in graphite per carbon atom. Due to the rigid strongly bonded three-dimensional structure of diamond, diamond is hard in nature. Now, apart from that, you will find that in graphite, the hexagonal ring structure consists of carbon atoms bonded by covalent bonds whereas longer and weaker Vander Waals bonds exist between two hexagonal rings. Due to these weak Vander Waals bonds, the rings can slip over each other thus making graphite soft