The membrane potential
Let us start with a cellular-level mechanism and examine the cell's membrane potential. There is an observed difference in electrical potential between the cell's inside and outside, which fluctuates depending on the cell's activities. Neurophysiologists have identified a resting membrane potential, which is a more or less constant value, roughly within the range -50 to -90 mV, depending on the cell type. In neurons and muscle cells, this potential can display a sudden change called the action potential, in which the voltage rapidly raises, going up to positive values, and rapidly goes back to rest, all within a few milliseconds. The mechanisms that maintain rest and sustain the action potential are fairly well known. Rest is actively maintained through the exchange of sodium (Na+) and potassium (K+) ions with the extracellular medium, and through so-called 'leak ' ion channels, which are always open and provide a resting permeability to certain ions, mainly K+. Protein pumps located in the cell's membrane use energy to pump Na+ ions out of the cell and K+ ions into the cell. The transient opening of ion pores in the membrane let ions pass through the membrane, changing the potential. The net direction of ionic flow depends on the membrane potential and also on the concentration differences of ions across the membrane. Biologists usually define a 'resting' membrane potential, with the inside of the cell being negative with respect to the outside. The active ion pumping keeps ionic differences across the membrane: Na+ concentration is larger outside, K+ is larger inside. 
Any small initial stimulus that raises the voltage would cause a transient opening of Na+-specific channels, which allows Na+ ions to cross the membrane from the outside to the inside. This, in turn, raises the membrane voltage even further, activating more Na+ channels. The resulting raising of voltage is counteracted by two factors: Na+ channels close ('inactivate,' in the technical jargon) and K+-specific channels open, allowing K+ ions to cross the membrane in the opposite direction (in to out), pulling the voltage back to rest. The specific responses that a cell produces in response to stimuli depend on the type and amount of ion channels present in the membrane.