The two sides of a nerve cell membrane have unequally distributed ions ( Na+ and K+). Sodium is inside, while potassium is outside. Carriers actively transport them. This active transport mechanism is called Sodium-Potassium Pump. Without stimulus, sodium channels are closed while some of the potassium channels are open.
Stimulus (depolarization) will cause the sodium channels to briefly open and the positively-charged ion diffuses into the nerve cell. The membrane potential becomes positive. The potassium channels open and positively-charged potassium diffuse out. With respect to the outside, the inside will become less positive again.