When two electrodes are connected through a suitable amplifier and placed on the surface of a single axon, no potential difference is observed. However, if one electrode is inserted into the interior of the cell, a constant potential difference is observed, with the inside negative relative to the outside of the cell at rest. A membrane potential results from separation of positive and negative charges across the cell membrane (Figure 1).

Fig1. A membrane potential results from separation of positive and negative charges across the cell membrane. The excess of positive charges (red circles) outside the cell and negative charges (blue circles) inside the cell at rest represents a small fraction of the total number of ions present. (Reproduced with permission from Kandel ER, Schwartz JH, Jessell TM, Siegelbaum SA, Hudspeth AJ (editors): Principles of Neural Science, 5th ed. New York, NY: McGraw-Hill; 2013.)
In order for a potential difference to be present across a membrane lipid bilayer, two conditions must be met. First, there must be an unequal distribution of ions of one or more species across the membrane (ie, a concentration gradient). Second, the membrane must be permeable to one or more of these ion species. The permeability is provided by the existence of channels or pores in the bilayer; these channels are usually permeable to a single species of ions. The resting mem brane potential represents an equilibrium situation at which the driving force for the membrane-permeant ions down their concentration gradients across the membrane is equal and opposite to the driving force for these ions down their electrical gradients.
In neurons, the concentration of K+ is much higher inside than outside the cell, while the reverse is the case for Na+. This concentration difference is established by Na, K ATPase. The outward K+ concentration gradient results in passive movement of K+ out of the cell when K+-selective channels are open. Similarly, the inward Na+ concentration gradient results in passive movement of Na+ into the cell when Na+-selective channels are open.
In neurons, the resting membrane potential is usually about –70 mV, which is close to the equilibrium potential for K+ (step 1 in Figure2). Because there are more open K+ channels than Na+ channels at rest, the membrane permeability to K+ is greater. Consequently, the intracellular and extra cellular K+ concentrations are the prime determinants of the resting membrane potential, which is therefore close to the equilibrium potential for K+. Steady ion leaks cannot continue forever without eventually dissipating the ion gradients. This is prevented by the Na, K ATPase, which actively moves Na+ and K+ against their electrochemical gradients.

Fig2. Changes in membrane potential and relative membrane permeability to Na+ and K+ during an action potential. Steps 1 through 7 are detailed in the text. These changes in threshold for activation (excitability) are correlated with the phases of the action potential. (Modified with permission from Silverthorn DU: Human Physiology: An Integrated Approach, 5th ed. Pearson, 2010.)