Touchscreens in phones work by detecting the presence and location of your touch on the screen. They use one of two technologies:
- Capacitive touchscreens use a layer on the screen that stores electrical charge. When your finger touches the screen, it disrupts the flow of the electrical charge. The phone detects this disruption and determines your touch location. Capacitive touchscreens require a conductive touch, like from your finger. They do not work with a regular stylus.
- Resistive touchscreens use a flexible top layer with electrodes that presses down on a bottom layer with electrodes when you touch it. The screen detects the touch location by determining which electrodes on each layer are connected. Resistive touchscreens can detect touch from a finger or a stylus. However, they are slightly less responsive and accurate than capacitive touchscreens.
In both cases, touch detection works by sensing a disruption in an electrical field on the screen. Software in the phone then responds to the touch event by activating an app or performing an action like scrolling or zooming. The responsiveness and smoothness of the touch interaction depends on the quality of the touchscreen technology and the software that interprets your touches. Touchscreen phones use a combination of capacitive or resistive touch sensing along with multi-touch detection to enable all the interactive and intuitive gestures you can perform on a smartphone screen, like pinching to zoom in or swiping to scroll. The technology behind touchscreens has enabled the smartphone interface we know and use today.
That's the basics of how touchscreens in phones work.