Graphite is a naturally-occurring form of crystalline carbon. It is a native element mineral found in metamorphic and igneous rocks.
The bonds between the layers of graphite are very weak which enables the layers to slide across each other, thus creating a mark on a paper rubbed on it. This is the reason why graphite is used in pencils.