Potentiometric pH meters measure the voltage between two electrodes and display the result converted into the corresponding pH value. They comprise a simple electronic amplifier and a pair of electrodes, or alternatively a combination electrode, and some form of display calibrated in pH units. It usually has a glass electrode and a reference electrode, or a combination electrode. The electrodes, or probes, are inserted into the solution to be tested. pH meters may also be based on the antimony electrode (typically used for rough conditions) or the quinhydrone electrode.
In order to accurately measure the potential difference between the two sides of the glass membrane reference electrode, typically a silver chloride electrode or calomel electrode are required on each side of the membrane. Their purpose is to measure changes in the potential on their respective side. One is built into the glass electrode. The other, which makes contact with the test solution through a porous plug, may be a separate reference electrode or may be built into a combination electrode. The resulting voltage will be the potential difference between the two sides of the glass membrane possibly offset by some difference between the two reference electrodes, that can be compensated for. The article on the glass electrode has a good description and figure.
The design of the electrodes is the key part: These are rod-like structures usually made of glass, with a bulb containing the sensor at the bottom. The glass electrode for measuring the pH has a glass bulb specifically designed to be selective to hydrogen-ion concentration. On immersion in the solution to be tested, hydrogen ions in the test solution exchange for other positively charged ions on the glass bulb, creating an electrochemical potential across the bulb. The electronic amplifier detects the difference in electrical potential between the two electrodes generated in the measurement and converts the potential difference to pH units. The magnitude of the electrochemical potential across the glass bulb is linearly related to the pH according to the Nernst equation.
The reference electrode is insensitive to the pH of the solution, being composed of a metallic conductor, which connects to the display.  This conductor is immersed in an electrolyte solution, typically potassium chloride, which comes into contact with the test solution through a porous ceramic membrane. The display consists of a voltmeter, which displays voltage in units of pH.
On immersion of the glass electrode and the reference electrode in the test solution, an electrical circuit is completed, in which there is a potential difference created and detected by the voltmeter. The circuit can be thought of as going from the conductive element of the reference electrode to the surrounding potassium-chloride solution, through the ceramic membrane to the test solution, the hydrogen-ion-selective glass of the glass electrode, to the solution inside the glass electrode, to the silver of the glass electrode, and finally the voltmeter of the display device. The voltage varies from test solution to test solution depending on the potential difference created by the difference in hydrogen-ion concentrations on each side of the glass membrane between the test solution and the solution inside the glass electrode.  All other potential differences in the circuit do not vary with pH and are corrected for by means of the calibration.
For simplicity, many pH meters use a combination probe, constructed with the glass electrode and the reference electrode contained within a single probe. A detailed description of combination electrodes is given in the article on glass electrodes.
The pH meter is calibrated with solutions of known pH, typically before each use, to ensure accuracy of measurement.  To measure the pH of a solution, the electrodes are used as probes, which are dipped into the test solutions and held there sufficiently long for the hydrogen ions in the test solution to equilibrate with the ions on the surface of the bulb on the glass electrode. This equilibration provides a stable pH measurement.