When a passive current flows across the membrane following a synaptic or receptor potential, the depolarized membrane potential triggers the voltage-gated Na+ channels to open. The inward Na+ ionic currents enhance the depolarization which triggers more Na+ channels to open to let in more ionic currents. This is a positive feedback loop called the Hodgkin-Huxley cycle).
If the initial depolarization caused by a passive current is not strong enough to reach a threshold (about -48 mV), it will diminish without triggering any significant response from the neuron. But if the depolarized membrane potential passes the threshold, the Na+ channel currents dominate the process and the membrane potential is highly depolarized to form a positive peak (a spike), the action potential, whose amplitude is independent of the initial depolarization. Note that the intensity of the neural signal transmitted in a neuron is not coded by the magnitude of the membrane potential (as all action potentials are of the same intensity), but by the number of action potentials generated per unit time, called the firing rate.
With a short delay after the opening of the voltage-gated Na+ channels, membrane depolarization triggers the voltage-gated K+ channels to open and the outward K+ currents lead to a strong repolarization. The membrane potential drops quickly from the positive peak to a negative level even lower than the resting potential (70 mV). This is called hyperpolarization, the second phase of the action potential. After a few milliseconds the membrane potential returns to its resting level.
During the time following the repolarization phase of the action potential, the voltage-gated Na+ channels are inactivated and unable to be opened, regardless of how much the membrane is depolarized. This is the absolute refractory period, which is followed by a short relative refractory period during which action potential can be generated but only with larger-than-normal depolarization. This limited rate of action potential generation determines the neurons' frequency resolution.