Scattered throughout the axon membrane are sodium channels and potassium channels.
Ions diffuse through these channels.
Sodium/potassium pumps capture ions and actively push them through the membrane.
The positively charged sodium ions are repelled by the other positive charges outside the axon,
and attracted to the negative charges inside, but are kept out by the sodium gates in the cell membrane.
When the neuron fires, the part of the axon nearest the cell body opens its sodium gates,
allowing the sodium ions to rush in.
The influx of these positively charged ions depolarizes that part of the axon making it electrically positive relative to the extracellular fluid.
This in turn causes the next section of the axon to open its gates and become depolarized,
and the electrical impulse - called the action potential - moves down the axon like a wave.
By this time (about 1/2 millisecond later) the sodium gates in the first section of the axon close up again.
Other gates open to allow some of the potassium ions, repelled by the sudden positive shift,
to flow out of the axon, therefore repolarizing the membrane.