The main cell of the brain is the neuron. The neuron has a semipermeable membrane that under specific circumstances lets potassium through. Another common cell is the glia cell, which only has potassium channels. Potassium, K+, has a positive charge and it can pass across the membrane at specific channels, depending on their state (open/closed). The channels are ion specific as the amino acids that make up the channels (proteins) have different charges and configurations.
Different membrane ion channels have different roles. K+ is mainly found in the cytoplasm during resting state with an equilibrium potential of -75mV. In the typical neuron model, this potential is larger than that of Na+ or Cl-.
Ions seek out an equilibrium where they do not have to move because positive and negative charges repel each other. However, the cell is determined to manage this laziness and to avoid a stand-still, it has a negative potential.
When K+ exits the cell, the relationship between positive and negative ions changes, leading to an increasing voltage difference between the inner cytoplasmic and the outer extracellular ions. The negativity in the cell increases and two things happen: a chemical driving force from K+ and an electrical driving force - resulting from the voltage difference. As the K+ exits the cell, neighboring channels increasingly adopt the same pattern and this gives rise to a domino effect along the cell membrane, which travels through the axon. As this switch from -/+ to +/- occurs as K+ passes the membrane the outer charges ++++ switch to ----. This results in a voltage +- that grows along the axis ++--, +++---, ++++----, but this is mediated by Cl-, resulting in a cycling of the potential - and it moves:
------, +-----, ++----, +++---, +++++-, -+++++, --++++, ---+++, ----+, ------
(Kandel et al., Principles of Neural Science, 5th ed., p.126-129, p.144)
The potassium drives the action potential and that is why neurons can "talk to each other" and signals can reach their destination. This is why potassium is important for the nervous system.
Above, +++--- implies the outer charge and thus the cell membrane has the voltage:
+ + + - - -
- - - + + +