Sodium and potassium ions are found in all animal cells and,
usually, the concentration of potassium ions inside the cell is greater
than that of sodium. In many cells, this concentration difference is
maintained by a 'sodium pump', a process for which the energy is
supplied by the hydrolysis of adenosine triphosphate (ATP).
Diffusion of excess potassium ions outwards through the cell wall
gives the inside of the cell a net negative charge (due to the anions
present) and a potential difference is established across the cell wall.
In a nerve cell, a momentary change in the permeability of the cell
wall to sodium ions can reverse the sign of this potential difference,
and this produces the electrical impulse associated with the action
of the nerve.