Action potential is a mechanism of transfer of ions across the plasma membrane down their elctrochemical gradient. Action potential is regenerated by the influx of ions such as sodium in case of voltage gated sodium channels. The voltage gated channels can be either open or closed depending on the action potential. Depolarization of membrane leads to the opening of these channels that allow the sodium ions to enter the cell down their electrochemical gradient. The threshold of action potential is reached when the entry of sodium ions out reach the exit of potassium ions from the cell. This leads to the generation of action potential.