A Screen That Feels Your Touch
Touchscreens are now the main way we interact with phones and tablets. We tap, swipe, and pinch the glass, and the device responds instantly. It feels completely natural. But a sheet of glass has no buttons and no moving parts. So how does it know not only that you touched it, but exactly where? The answer involves a hidden property of your own body.
Your Body Conducts Electricity
The most common type of touchscreen today is called a capacitive touchscreen. It relies on one important fact: the human body conducts electricity. We carry a small natural electrical charge, and our fingers can affect electric fields. This is the secret behind the modern touchscreen. It is also why these screens usually do not respond to a gloved finger or the back of a pen, since those do not conduct electricity the way bare skin does.
An Invisible Electric Field
A capacitive touchscreen has a transparent grid of conductive material built into the glass. This grid maintains a small, even electric field across the surface of the screen. When nothing is touching it, the field stays uniform and undisturbed. The screen is constantly maintaining and watching this delicate electrical field, ready to notice the slightest change anywhere on its surface.
Detecting the Touch
When your finger touches the glass, your body draws a tiny amount of the screen's electric charge to the point of contact. This causes a small, measurable change in the electric field at that exact spot. The device's controller is constantly scanning the grid, and it detects where the change happened. It translates that location into a precise position on the screen. Because the grid can sense more than one change at once, modern screens can also follow several fingers at the same time, allowing gestures like pinching.
Source
This article was written using information from Wikipedia.