Step-by-step explanation:
A nerve impulse is a result of a difference in electrical charges across the plasma membrane of a neuron, this difference comes from ions which are electrically charged atoms or molecules.
Before the nerve impulse happens there's a resting potential in the neuron ready to transmit the impulse, this resting potential happens thanks to the sodium-potassium pump that uses ATP to pump Na+ out of the cell and K+ into it, resulting in the inside of a neuron negatively charged.
When a nerve impulse happens (thanks to the receiving of a chemical signal from another cell) a sudden reversal of the electrical charge of a resting neuron occurs, the inside of the neuron becomes positive when the gates in sodium channels open allowing positive sodium ions to flow back into the cell.
I hope you find this information useful! Good luck!