When a stimulus is applied, sodium potassium pump stop operating. Sodium ions rush inside and potassium ions rush outside. This results in depolarization (action potential). After a period of action potential sodium potassium pump operate (efflux of $Na^{+}$ and influxes of $K^{+}$) and axon will get resting potential by repolarization.