There are more ways to make a touchscreen than you can shake a stick at, but the kind that have become most common in smartphones and tablets are known as "mutual capacitance touchscreens".
These are based on capacitors, common electronic components used in everything from radios to computer memory. A capacitor consists of two conductive electrodes separated by a small gap of insulation. It gives a capacitor the ability to store a small electric charge and the amount it can store – its capacitance – is easily measured.
Placing a conductive object (like your finger) close to a capacitor can change the capacitance and this idea has long been employed in touch controls – those buttons sometimes found in lifts that have no moving parts.
The same thing can be applied to an electronic display to create a touchscreen, though there are a couple of hurdles. The screen needs to be covered in conductive material, to form capacitors, but also needs to be transparent to let the user see the display clearly. Transparent conductors, though rare, exist. One called indium tin oxide (ITO) is currently the favoured material for touchscreens.
It's not transparent like glass, but is good enough in thin films and is safe and easy to work with. It is also expensive and unsustainable, as it contains the rare metal indium. Alternatives such as copper nanowires are being developed to replace ITO in this and other applications, where transparent conductors are needed.
ITO allows you to create a transparent touchscreen that detects when it is touched, but a touchscreen also needs to know where it has been touched to be really useful. To do this the screen is divided up into a grid and each location is examined separately. In practice this is achieved by creating one layer of electrodes forming horizontal strips running across the screen, overlaying it with the insulator and then with another layer of electrodes forming vertical strips. At each intersection of the electrodes, a capacitor is effectively created between the strips that cross there. By scanning these capacitors in turn the controlling electronics can detect exactly which parts of the grid are being touched. The glass surface you actually touch protects everything from the elements.
You don't need many electrodes to get good accuracy with this method.
With just a handful of electrodes the location of a touch can be determined to the nearest millimetre or better, by comparing the stimulation of neighbouring electrodes.
There are downsides to touchscreens based on capacitance. Conductivity is crucial and that's why these touchscreens often don't work through gloves or with other objects like pens – which don't have the conductive properties of a finger – unless they are specially made.
But mutual capacitance touchscreens can detect more than one finger at a time, something that confuses other touchscreens. This is crucial for the multi-touch gestures that are revolutionising the way we interact with digital devices, and that alone makes them the best option for use in those devices.