Graphite consits of parallel sheets of covalently bound carbon. These covalent bonds are such that they are able to conduct electricity (they have a conjugated pi system). The parallel sheets of carbon are connected by much weaker, non-covalent bonds which are unable to conduct electricity (these bonds are known as pi-pi interactions or pi-pi stacking). This structure of graphite has a few important consequences:
1) Since the parallel sheets of carbon in graphite are only weakly bound, they easily slide off of eachother. This is why you can write with a pencil; when you drag the graphite tip against a piece of paper, the paper shears off the sheets of carbon, leaving a mark on the paper.
2) Graphite conducts heat and electricity dirrectionally. Heat and electricity can only go across a sheet but not between sheets.