Graphite is an allotrope of carbon. The structure of graphite is a honeycomb structure where each carbon is covalently bonded to 3 other carbons. Given that carbon is able to make 4 bonds, there is one free electron per carbon. In graphite, this electron is delocalised which means that it is free to move. Electricity is a flow of charged particles therefore when a potential is applied across graphite, these electrons can move and therefore conduct electricity.