How they work.
It depends on the device and the type of touchscreen you’re using. There are two different kinds used in most consumer electronics:Resistive touchscreens and Capacitive touchscreen.
Resistive touchscreens - which are used on some Samsung, HTC and LG phones, and are typical of ATMs, supermarket checkout stations and the electronic signature doodad the UPS guy carries - have a glass panel that’s covered with conductive and resistive metallic layers. These two layers are held apart by spacers, and an electrical current runs through them when the screen is operational. When a user touches the screen, the two layers make contact in that spot. The change in the electrical field is noted and the device coordinates the point of contact so a device driver can translate user touches and movements into something that the OS can understand.
Capacitive touchscreens - used on the iPhone, Droid Eris and Blackberry Storm, among other smartphones - have a glass screen covered by a transparent conductor layer that stores an electrical charge. When a user touches a finger (which is also conductive) to the screen, the electrical field distorts and the device uses that to figure out where the screen was touched and relays the info to the driver.