An action potential is generated as Na+ ions flow in at one location along an axon.
The depolarization spreads to the neighboring region of the membrane, initiating an action potential there.
The original region repolarizes as K+ ions flow out.
The depolarization-repolarization process is repeated as the action potential is propagated down the axon.