There are many types of touchscreen technology, but some of them are resistive and capacitive.
Infrared screens are also a type of touchscreen technology.
The resistive screens work because they create a barrier that prevents electricity from passing through.
There are two layers of resistance when touchscreen input is used: the top layer (usually made of glass or plastic) and the bottom layer (usually a layer of rubber or felt).