Diamond and graphite are both allotropes (polymorphs) of carbon. Their dramatically different properties (hardness, electrical conductivity, etc.) arise from their different crystal structures, which are formed under vastly different pressure and temperature conditions. Graphite is the stable form of carbon at standard conditions, while diamond is stable only at extremely high pressures and temperatures.