The story
A pencil slides across your notebook and leaves a gray line. Somewhere else, a diamond cuts into a hard surface. One material rubs off easily. The other is famous for resisting scratches. Both contain the same element: carbon.
The dark material in a pencil is graphite mixed with other ingredients, often clay. It is not the metal lead, even though we call it pencil lead. Graphite itself is a form of carbon. Diamond is another form. Different structures of the same element are called allotropes.
The difference is in the connections. In diamond, each carbon atom bonds to four neighboring carbon atoms. Those bonds spread in three dimensions, forming a strong network throughout the crystal. Moving one part past another means interfering with that tightly connected structure.
In graphite, each carbon atom bonds strongly to three neighbors in a flat sheet. The sheets stack together, but the attractions between them are much weaker than the bonds inside each sheet. Layers can slide and separate much more easily.
When you write, small pieces of graphite transfer to the paper. The gray line is material left behind by the pencil. Graphite is not soft because its carbon atoms have become a softer kind of atom. Its layers make it easy for some parts of the structure to slip away.
This is a powerful change in perspective. Knowing the ingredients is important, but it does not tell us every property. How those ingredients are connected matters too. The same bricks can form different buildings, although the atomic structures are not literally assembled by a bricklayer.
The connection also explains why crushing a pencil does not instantly give you diamonds. Breaking a material into smaller pieces is different from rearranging its atomic bonds into a new structure. Carbon's familiar gray and sparkling forms are reminders that chemistry is about arrangements as well as names.