The membrane of an axon contains a large number of protein channels along its length, which all fall under three categories: the sodium/potassium pumps, the voltage-gated sodium channels & the voltage-gated potassium channels. In the resting potential, only the sodium/potassium pumps are involved.
This ATP dependent sodium/potassium pump pumps 3 sodium ions (Na+) out of the axon and 2 potassium ions (K+) into the axon. The membrane is more permeable to potassium ions than it is to sodium ions (this is because most of the potassium channels are open whilst most of the sodium channels are closed) therefore potassium ions constantly leak out of the axon cyctoplasm. This causes a net difference in concentration of the two ions accross the membrane. This gives rise to a potential difference accross the membrane, a slight difference in charge, with the inside of the membrane slightly negative compared to the outside of the axon. In a typical human axon this is about -70mV, but can vary grately between organisms.
It is important for the axon to have this slight negative potential difference accross the membrane as it enables an actional potential to start.