There are numerous ionic fluxes during an action potential, which involves depolarisation, repolarisation and hyperpolarsation. During depolarisation, voltage-gated sodium ion channels open. In turn, sodium ions flow into the cell, down an electrochemical gradient, resulting in a inward current. This is the "upstroke" of the action potential, which depolarises the cell to a more positive membrane potential, due to the influx of positively charged sodium ions.
After depolarisation has occured, voltage-gated sodium ion channels close and voltage-gated potassium ion channels open. This results in an efflux of potassium ions from the cell. The efflux of positively charged potassium ions results in repolarisation, as the cell returns to a more negative membrane potential. The events of repolarisation tend to hyperpolarise the cell, as the membrane potential becomes more negative than the original resting potential. During hyperpolarisation, another action potential is prevented from occuring. In the refractory period, the sodium-potassium exchanger actively pumps sodium out of the cell and potassium into the cell; this resets the resting membrane potential and enables another action potential to take place.