Normally, when the neuron is not firing and is considered to be at resting potential, the inside of the neuron, the cytosol, is negative compared to the outside of the neuron. The inside of the neuron contains more potassium ions, while the outside of the neuron contains more sodium ions.
When an electric charge causes a neuron to fire, what happens is that ion channels, which are basically proteins that transfer ions across a membrane, cause the sodium ions that are on the outside of the neuronal membrane to go inside the neuron, and also causes the potassium ions that are on the inside of the neuron to go to the outside.
This causes a change in resting phase, or the resting membrane potential, in that the inside of the neuron is now more positive with regards to the outside. This is a reversal of the resting potential, and is called depolarization. To repolarize, or cause a neuron to go back to its resting potential charge, the opposite must occur: sodium must flow back out, and potassium must flow back in. this also occurs through the ion channels. But, what happens is that there is generally a large amount of sodium flowing back out of the neuron that the inside becomes much more negative compared to the resting potential.
This is called the undershoot, or the after-hyperpolarization. This causes a refractory period, where the neuron, as much as it is stimulated by al electric charge, will not fire.
Action potentials are caused by the depolarization of the membrane. Now, not any and all electric charges will cause depolarization:
The resting membrane potential is around -70mV (so you can see that the inside of the neuron is more negative with respect to the outside). The electric charge coming through must cause the -70mV to rise, or become less negative, and the membrane potential must increase to about 35-40mV. Otherwise, the neuron will not fire. This 40mV is caused threshold, because of the fact that the membrane potential must reach that charge before the neuron can fire.
A neuron will either fire, or it won’t. If it reaches threshold, it will fire completely. There is no possibility that the neuron will only half-fire, or some derivative thereof. Consequently, the action potential is said to follow after the all-or-none concept: either they fire, or they don’t, much like muscles either contract and cause movement, or they don’t.
This is a cool video that visually explains the action potential.