A nerve impulse, or action potential, is generated when a neuron receives a sufficient stimulus. This stimulus causes a temporary change in the electrical charge of the neuron's membrane. The process is initiated by the opening of sodium channels in the membrane, allowing sodium ions to rush into the neuron. This influx of sodium ions causes depolarization. As the impulse travels along the axon, it propagates by opening adjacent sodium channels, allowing the signal to move rapidly.