Neurons transmit electrical impulses by allowing the passage of charged ions across their membranes in response to stimuli, changing the charge of the neuron in a process that propagates through the axon of the neuron. Normally, neurons maintain an internal negative charge relative to their environment by excluding sodium ions from their cytoplasm. When activated, sodium channels open up, allowing sodium ions to flood in and neutralizing the charge.
The membrane of a neuron is somewhat permeable to potassium ions, less permeable to chloride ions and much less permeable to sodium ions. Each of these substances pass through the membrane during diffusion, but sodium does so only slowly, and neurons use active transport to pump sodium out. Since it only diffuses slowly back into the cell, this creates an excess concentration of sodium ions outside of the cell, and thus a greater net positive charge.
Once the neuron is stimulated, sodium ions begin to leak in. If the change is large enough, it triggers a change in the cell where all channels for sodium open, allowing diffusion to occur and equalizing the interior of the neuron with its environment. While this only initially occurs in one part of the cell, the change in one part stimulates the adjacent portions, causing the change in electric charge to propagate through the cell.