Capacitive Distance Measuring Principle
Two types of capacitive distance sensors are common: Single electrode sensors and two electrode sensors.
Dual electrode sensors can achieve lower noise levels and higher resolution. The principle is based on two conductive surfaces and a high-frequency (>100kHz) alternating current generating a homogenous electric field between them. The capacitance is proportional to the active surface divided by the distance. With a given area, the measured distance is proportional to the distance. Single-electrode capacitive sensors work similarly. They are easier to handle and can measure against all kinds of conductive surfaces.
More information on capacitive measuring technology