How does a touchscreen actually work?
Almost all modern touchscreens are capacitive: they detect the electrical properties of your finger, not pressure — which is why a gloved hand or a pencil does nothing, and why a wet screen misbehaves.
The mechanism. A transparent conductive grid, usually indium tin oxide, is laid over the display in rows and columns. At each intersection there is a tiny capacitance — the ability to store charge. Your body is conductive and holds charge, so bringing a finger near an intersection changes that capacitance measurably. The controller scans the grid many times a second, finds where the values changed, and interpolates between intersections to get a position finer than the grid spacing.
Projected capacitance, the type in phones and tablets, senses through the cover glass and supports multi-touch, because several changed intersections can be resolved independently. This is what enabled pinch-to-zoom and gestures.
Why it behaves as it does:
Gloves do not work unless the material is conductive or thin enough to couple — which is exactly what touchscreen gloves provide.
Water causes chaos, because a droplet is conductive and registers as a touch. Some devices now detect and reject this.
A stylus must be conductive or active. Passive rubber-tipped styluses imitate a fingertip; active pens transmit their own signal, which is how pressure, tilt and palm rejection become possible.
Screen protectors that are too thick reduce sensitivity.
A charger with poor electrical isolation can inject noise and cause phantom touches — the common "my screen goes mad while charging" fault.
Resistive screens, the older technology, work completely differently: two conductive layers separated by a gap, pressed together by physical pressure. They work with anything, including gloves and styluses, are cheaper, and suffer poorer clarity and no multi-touch — which is why they persist in industrial equipment, older satnavs and payment terminals.
Other types exist: infrared grids and acoustic-wave systems in large displays and kiosks, and force sensing layered on top of capacitive sensing to measure how hard you press.