Action potentials are able to propagate along an axon, unidirectionally, due to voltage-gated Na+ and K+ channels.
The membrane is depolarised, with the membrane voltage becoming more positive when an action potential is transmitted. This induces the opening of voltage-gated ion channels, allowing the depolarisation to move along the axon. After ~1ms, the Na+ channels are plugged by an inactivating particle preventing any further transport. This plug remains in place for several ms after it is inserted, preventing the reversal of the action potential. The plugging of the channel also causes the refractory period observed on repolarisation, before the membrane potential returns to the resting potential.
K+ channels are slower at responding, taking longer to open (they can also be called delayed K+ channels). This allows the repolarisation to occur, bringing the membrane potential back to its resting potential.
Na+ moves out of the axon, and K+ moves in.