Graphite has a two-dimensional structure where carbon atoms form hexagonal layers that can slide over each other, making it soft and a good lubricant, unlike diamond, which is hard and has a three-dimensional structure.