How Do Glass pH Electrodes Work?
The glass electrode basically consists of four major components, a glass membrane, an internal buffer solution, a reference wire and the glass stem.  The pH glass electrode works with two reference electrodes, a reference inside the glass and a reference that is in contact with the solution outside of the glass. pH measures the milli-volt difference in the pH electrode system. A leached layer forms on both sides of the pH glass membrane. The difference in potential between the inner and outer layers is called the phase boundary potential and is the potential milli-volt difference that is the pH signal.  For best results, a symmetrical liquid cell is set up on both sides of the glass membrane. To set up the symmetrical cell, the internal fill solution in the glass and the reference fill solution are similar in their makeup. The symmetry is important so that the temperature curves for the two solutions are close, thereby canceling each others temperature effect.

How Do pH Reference Electrodes Work?
Reference electrodes work like a battery with the chemical components producing a predictable millivoltage, that is also in electrical contact with the solution being measured. The reference is a constant millivoltage thus, giving the glass a reference point to distinguish changes in Hydrogen ion concentration seen as a potential across the leached layers.