The beginning of the action potential, phase 1, specialized membrane proteins (voltage-gated sodium channels) in the cell membrane selectively allow sodium ions to enter the cell. This causes the membrane potential to rise at a rate of about 300 V/s. As the membrane voltage rises (to about 40 mV) sodium channels close due to a process called inactivation.
The depolarization of the membrane allows calcium channels to open as well. As sodium channels close calcium provides current to maintain the potential around 10 mV. The plateau lasts on the order of 100 ms. At the time that calcium channels are getting activated, channels that mediate the transient outward potassium current open as well. This outward potassium current causes a small dip in membrane potential shortly after depolarization. This current is observed in human and dog action potentials, but not in guinea pig action potentials.
Repolarization is accomplished by channels that open slowly and are mostly activated at the end of the action potential (slow delayed-rectifier channels), and channels that open quickly but are inactivated until the end of the action potential (fast delayed rectifier channels). Fast delayed rectifier channels open quickly but are shut by inactivation at high membrane potentials. As the membrane voltage begins to drop the channels recover from inactivation and carry current.