Most electronic tuners use a piezoelectric sensor to detect the string's vibration. The piezoelectric sensor is a thin piece of material that generates a voltage when it is bent or stretched. When the string vibrates, it causes the piezoelectric sensor to bend or stretch, which generates a voltage signal.
The voltage signal from the piezoelectric sensor is then amplified and processed by the tuner's electronic circuitry. The circuitry extracts the fundamental frequency of the string's vibration and compares it to the reference pitch. If the string is in tune, the tuner will display a visual indication.
Some electronic tuners also have a built-in microphone, which can be used to tune instruments that do not have piezoelectric sensors, such as acoustic guitars. The microphone picks up the sound of the string's vibration and converts it into an electrical signal, which is then processed by the tuner's circuitry.
Electronic tuners are very accurate and easy to use, and they are essential tools for any musician who wants to keep their instrument in tune.